diff --git a/apps/portal/src/components/resumes/comments/CommentsList.tsx b/apps/portal/src/components/resumes/comments/CommentsList.tsx
index 81f41394..7d8bf02c 100644
--- a/apps/portal/src/components/resumes/comments/CommentsList.tsx
+++ b/apps/portal/src/components/resumes/comments/CommentsList.tsx
@@ -24,10 +24,12 @@ export default function CommentsList({
const { data: session } = useSession();
// Fetch the most updated comments to render
- trpc.useQuery(['resumes.reviews.list', { resumeId, tab }], {
+ trpc.useQuery(['resumes.reviews.list', { resumeId, section: tab }], {
onSuccess: setComments,
});
+ // TODO: Add loading prompt
+
return (
diff --git a/apps/portal/src/server/router/resumes-reviews-router.ts b/apps/portal/src/server/router/resumes-reviews-router.ts
index 01bb1fd0..8219edce 100644
--- a/apps/portal/src/server/router/resumes-reviews-router.ts
+++ b/apps/portal/src/server/router/resumes-reviews-router.ts
@@ -8,11 +8,11 @@ import type { ResumeComment } from '~/types/resume-comments';
export const resumeReviewsRouter = createRouter().query('list', {
input: z.object({
resumeId: z.string(),
- tab: z.nativeEnum(ResumesSection),
+ section: z.nativeEnum(ResumesSection),
}),
async resolve({ ctx, input }) {
const userId = ctx.session?.user?.id;
- const { resumeId, tab } = input;
+ const { resumeId, section } = input;
// For this resume, we retrieve every comment's information, along with:
// The user's name and image to render
@@ -42,7 +42,7 @@ export const resumeReviewsRouter = createRouter().query('list', {
},
where: {
resumeId,
- section: tab,
+ section,
},
});