Skip to content

Commit

Permalink
adds fallback url for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsingh132 committed Dec 11, 2023
1 parent a415065 commit f794e61
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions __tests__/Home.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ describe("Home Component", () => {
} as Response)
);

// screen.debug(undefined, Infinity);

// eslint-disable-next-line testing-library/no-unnecessary-act
await act(async () => {
render(
Expand All @@ -180,7 +178,6 @@ describe("Home Component", () => {
const trendingPostsElementsUndefined =
screen.queryAllByTestId("trending-post");
expect(trendingPostsElementsUndefined.length).toBe(0);
// screen.debug(undefined, Infinity);

// // reset the backend url
// process.env.NEXT_PUBLIC_BACKEND_URL = "http://localhost:3000/api";
Expand Down
1 change: 0 additions & 1 deletion __tests__/Navbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,5 @@ describe("Navbar for authenticated user", () => {
window.innerWidth = 1024;
fireEvent(window, new Event("resize"));

screen.debug(undefined, Infinity);
});
});
2 changes: 1 addition & 1 deletion app/utils/config/backendUrl.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const backendUrl = `${process.env.NEXT_PUBLIC_BACKEND_URL}`;
export const backendUrl =`${process.env.NEXT_PUBLIC_BACKEND_URL || "http://localhost:3000/api"}`;

0 comments on commit f794e61

Please sign in to comment.