From 113b92f1315d2bb4f4286020339dadc725d36f8d Mon Sep 17 00:00:00 2001 From: Terence Ho <> Date: Mon, 24 Oct 2022 15:11:18 +0800 Subject: [PATCH] [resumes][refactor] rearrange review page --- .../resumes/comments/ResumeCommentsForm.tsx | 2 +- .../resumes/comments/ResumeCommentsList.tsx | 25 +----- .../comments/ResumeCommentsSection.tsx | 40 --------- apps/portal/src/pages/resumes/[resumeId].tsx | 84 ++++++++++++++----- 4 files changed, 67 insertions(+), 84 deletions(-) delete mode 100644 apps/portal/src/components/resumes/comments/ResumeCommentsSection.tsx diff --git a/apps/portal/src/components/resumes/comments/ResumeCommentsForm.tsx b/apps/portal/src/components/resumes/comments/ResumeCommentsForm.tsx index d27c4c91..0e4235e9 100644 --- a/apps/portal/src/components/resumes/comments/ResumeCommentsForm.tsx +++ b/apps/portal/src/components/resumes/comments/ResumeCommentsForm.tsx @@ -83,7 +83,7 @@ export default function ResumeCommentsForm({ }; return ( -
Please fill in at least one section to submit your review
diff --git a/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx b/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx
index 68da72d1..b7cf69af 100644
--- a/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx
+++ b/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx
@@ -11,24 +11,20 @@ import {
} from '@heroicons/react/24/outline';
import { ResumesSection } from '@prisma/client';
import { Spinner } from '@tih/ui';
-import { Button } from '@tih/ui';
import { trpc } from '~/utils/trpc';
import { RESUME_COMMENTS_SECTIONS } from './resumeCommentConstants';
import ResumeCommentListItem from './ResumeCommentListItem';
-import ResumeSignInButton from '../shared/ResumeSignInButton';
import type { ResumeComment } from '~/types/resume-comments';
type ResumeCommentsListProps = Readonly<{
resumeId: string;
- setShowCommentsForm: (show: boolean) => void;
}>;
export default function ResumeCommentsList({
resumeId,
- setShowCommentsForm,
}: ResumeCommentsListProps) {
const { data: sessionData } = useSession();
@@ -52,31 +48,14 @@ export default function ResumeCommentsList({
}
};
- const renderButton = () => {
- if (sessionData === null) {
- return