+
+
+ {questions.length
+ ? `You have ${resultListData.totalItems} bookmarked questions.`
+ : "You haven't bookmarked any questions."}
+
+
+ {!questions.length && (
+
Bookmark questions to view them here.
+ )}
+
+
+
+ pageSize
+ : false
+ }
+ isLoading={isLoading}
+ >
+ {questions.map((question) => (
+
+ ))}
+
+
+ {isLoading && (
+
+
+
+ )}
+
+
+ );
+};
diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx
index fd77946..cc042e4 100644
--- a/frontend/src/routes/index.tsx
+++ b/frontend/src/routes/index.tsx
@@ -12,6 +12,7 @@ import QuestionRoute from "./question";
import { Search } from "./search";
import Signup from "./signup";
import TagPage from "./tag";
+import { BookmarkedQuestions } from "@/routes/bookmarks";
export const routes: RouteObject[] = [
{
@@ -26,6 +27,10 @@ export const routes: RouteObject[] = [
path: "/login",
Component: Login,
},
+ {
+ path: "/bookmarks",
+ Component: BookmarkedQuestions,
+ },
{
path: "/logout",
async action() {
diff --git a/frontend/src/routes/profile.test.tsx b/frontend/src/routes/profile.test.tsx
index fc76cad..82b185e 100644
--- a/frontend/src/routes/profile.test.tsx
+++ b/frontend/src/routes/profile.test.tsx
@@ -126,7 +126,7 @@ describe("Profile component", () => {
render(