diff --git a/frontend/src/routes/bookmarked.test.tsx b/frontend/src/routes/bookmarks.test.tsx similarity index 93% rename from frontend/src/routes/bookmarked.test.tsx rename to frontend/src/routes/bookmarks.test.tsx index cf2cbf5..f56ecfc 100644 --- a/frontend/src/routes/bookmarked.test.tsx +++ b/frontend/src/routes/bookmarks.test.tsx @@ -15,7 +15,7 @@ import { } from "react-router-dom"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { routeConfig } from "."; - import { BookmarkedQuestions } from "./bookmarked"; + import { BookmarkedQuestions } from "./bookmarks"; // Mock the useGetBookmarkedQuestions hook vi.mock("@/services/api/programmingForumComponents", () => ({ @@ -72,7 +72,7 @@ import { it("should have no accessibility violations", async () => { const router = createMemoryRouter(routeConfig, { - initialEntries: ["/bookmarked"], + initialEntries: ["/bookmarks"], }); await testAccessibility(); @@ -88,9 +88,9 @@ import { } as QueryObserverSuccessResult); render( - + - } /> + } /> , ); diff --git a/frontend/src/routes/bookmarked.tsx b/frontend/src/routes/bookmarks.tsx similarity index 95% rename from frontend/src/routes/bookmarked.tsx rename to frontend/src/routes/bookmarks.tsx index 5d69c40..9be9287 100644 --- a/frontend/src/routes/bookmarked.tsx +++ b/frontend/src/routes/bookmarks.tsx @@ -47,8 +47,8 @@ export const BookmarkedQuestions = () => {

{questions.length - ? `Last ${resultListData.totalItems} bookmarked questions shown.` - : "No questions are bookmarked."} + ? `You have ${resultListData.totalItems} bookmarked questions.` + : "You haven't bookmarked any questions."}

{!questions.length && ( diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx index 8a869ef..cc042e4 100644 --- a/frontend/src/routes/index.tsx +++ b/frontend/src/routes/index.tsx @@ -12,7 +12,7 @@ import QuestionRoute from "./question"; import { Search } from "./search"; import Signup from "./signup"; import TagPage from "./tag"; -import { BookmarkedQuestions } from "@/routes/bookmarked"; +import { BookmarkedQuestions } from "@/routes/bookmarks"; export const routes: RouteObject[] = [ { @@ -28,7 +28,7 @@ export const routes: RouteObject[] = [ Component: Login, }, { - path: "/bookmarkedquestions", + path: "/bookmarks", Component: BookmarkedQuestions, }, { diff --git a/frontend/src/routes/profile.tsx b/frontend/src/routes/profile.tsx index cf635cd..bd45753 100644 --- a/frontend/src/routes/profile.tsx +++ b/frontend/src/routes/profile.tsx @@ -153,12 +153,12 @@ export default function Profile() { {isPending ? "Saving..." : "Save"} ) : ( -
+
)