From ec1487b33bbe71d849fe8fa9e5d20f7181e10df9 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Sat, 5 Nov 2022 18:04:44 +0800 Subject: [PATCH] [resumes][refactor] make height calculation more robust --- .../src/components/resumes/ResumePdf.tsx | 8 +- .../comments/ResumeCommentListItem.tsx | 4 +- .../resumes/comments/ResumeCommentsForm.tsx | 2 +- .../resumes/comments/ResumeCommentsList.tsx | 2 +- .../resumes/shared/ResumeExpandableText.tsx | 9 +- apps/portal/src/pages/resumes/[resumeId].tsx | 140 +++++++++--------- 6 files changed, 87 insertions(+), 78 deletions(-) diff --git a/apps/portal/src/components/resumes/ResumePdf.tsx b/apps/portal/src/components/resumes/ResumePdf.tsx index 0cada39a..ea0bddba 100644 --- a/apps/portal/src/components/resumes/ResumePdf.tsx +++ b/apps/portal/src/components/resumes/ResumePdf.tsx @@ -35,10 +35,12 @@ export default function ResumePdf({ url }: Props) { }, [pageWidth]); return ( -
-
+
+
} noData="" diff --git a/apps/portal/src/components/resumes/comments/ResumeCommentListItem.tsx b/apps/portal/src/components/resumes/comments/ResumeCommentListItem.tsx index 881c4d85..af749a63 100644 --- a/apps/portal/src/components/resumes/comments/ResumeCommentListItem.tsx +++ b/apps/portal/src/components/resumes/comments/ResumeCommentListItem.tsx @@ -92,7 +92,7 @@ export default function ResumeCommentListItem({ <> ·{' '} )}
); diff --git a/apps/portal/src/pages/resumes/[resumeId].tsx b/apps/portal/src/pages/resumes/[resumeId].tsx index 54992a15..ba7d9f42 100644 --- a/apps/portal/src/pages/resumes/[resumeId].tsx +++ b/apps/portal/src/pages/resumes/[resumeId].tsx @@ -235,80 +235,86 @@ export default function ResumeReviewPage() { {`${detailsQuery.data.title} | Resume Review`} -
-
-
-

+
+
+
+

{detailsQuery.data.title}

{userIsOwner && ( <> - +
+
+
+ +
)} - +
+ +
{renderReviewButton()}
-
+
{detailsQuery.data.additionalInfo && ( -
+
-
-
+
+
-
+
{renderReviewButton()}