Skip to content

Commit

Permalink
implement more control for forum pagination and refine questions
Browse files Browse the repository at this point in the history
  • Loading branch information
umitcan07 committed Nov 20, 2024
1 parent 96f4b29 commit 96ffe25
Show file tree
Hide file tree
Showing 7 changed files with 488 additions and 433 deletions.
5 changes: 3 additions & 2 deletions client/src/components/forum-answer-card.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Button, Separator } from "@ariakit/react";
import { RiArrowDownLine, RiArrowUpLine } from "@remixicon/react";
import { useFetcher } from "react-router-dom";

import { Answer } from "../routes/Forum/Forum.schema";
import {
downvoteForumAnswerAction,
upvoteForumAnswerAction,
} from "../routes/Forum/Forum.data";
import { Answer } from "../routes/Forum/Forum.schema";
} from "../routes/Forum/Question.data";
import { getNumberDifference, getRelativeTime } from "../utils";
import { Avatar } from "./avatar";
import { toggleButtonClass } from "./button";
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/forum-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import {
RiBookmark2Line,
} from "@remixicon/react";
import { Link, useFetcher } from "react-router-dom";

import { ForumQuestion } from "../routes/Forum/Forum.schema";
import {
bookmarkForumAction,
downvoteForumAction,
upvoteForumAction,
} from "../routes/Forum/Forum.data";
import { ForumQuestion } from "../routes/Forum/Forum.schema";
} from "../routes/Forum/Question.data";
import { getNumberDifference, pluralize } from "../utils";
import { Avatar } from "./avatar";
import { toggleButtonClass } from "./button";
Expand Down
7 changes: 4 additions & 3 deletions client/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ import { Login } from "./routes/Auth/Login";
import { loginAction, loginLoader } from "./routes/Auth/Login.data";
import { logoutLoader } from "./routes/Auth/Logout.data";
import { registerAction } from "./routes/Auth/Register.data";

import { forumLoader } from "./routes/Forum/Forum.data";
import {
answerForumAction,
bookmarkForumAction,
downvoteForumAction,
downvoteForumAnswerAction,
forumLoader,
forumQuestionLoader,
upvoteForumAction,
upvoteForumAnswerAction,
} from "./routes/Forum/Forum.data";
import { forumQuestionLoader } from "./routes/Forum/Question.data";
} from "./routes/Forum/Question.data";
import { homeLoader } from "./routes/Home/Home.data";
import { QuizPage } from "./routes/Quiz/Quiz";
import { quizLoader } from "./routes/Quiz/Quiz.data";
Expand Down
Loading

0 comments on commit 96ffe25

Please sign in to comment.