diff --git a/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx b/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx index 3f3dc3c2..271fdd44 100644 --- a/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx +++ b/apps/portal/src/components/resumes/comments/ResumeCommentsList.tsx @@ -48,64 +48,64 @@ export default function ResumeCommentsList({ } }; + if (commentsQuery.isLoading) { + return ( +
+ +
+ ); + } + return ( -
- {commentsQuery.isLoading ? ( -
- -
- ) : ( -
- {RESUME_COMMENTS_SECTIONS.map(({ label, value }) => { - const comments = commentsQuery.data - ? commentsQuery.data.filter((comment: ResumeComment) => { - return (comment.section as string) === value; - }) - : []; - const commentCount = comments.length; +
+ {RESUME_COMMENTS_SECTIONS.map(({ label, value }) => { + const comments = commentsQuery.data + ? commentsQuery.data.filter((comment: ResumeComment) => { + return (comment.section as string) === value; + }) + : []; + const commentCount = comments.length; - return ( -
- {/* CommentHeader Section */} -
-
- {renderIcon(value)} + return ( +
+ {/* CommentHeader Section */} +
+
+ {renderIcon(value)} - {label} -
-
+ {label} +
+
- {/* Comment Section */} -
- {commentCount > 0 ? ( - comments.map((comment) => { - return ( - - ); - }) - ) : ( -
- + {/* Comment Section */} +
+ {commentCount > 0 ? ( + comments.map((comment) => { + return ( + + ); + }) + ) : ( +
+ -
- There are no comments for this section yet! -
-
- )} +
+ There are no comments for this section yet! +
-
- ); - })} -
- )} + )} +
+
+ ); + })}
); } diff --git a/apps/portal/src/pages/resumes/[resumeId].tsx b/apps/portal/src/pages/resumes/[resumeId].tsx index beb8c793..15d50e83 100644 --- a/apps/portal/src/pages/resumes/[resumeId].tsx +++ b/apps/portal/src/pages/resumes/[resumeId].tsx @@ -3,7 +3,7 @@ import formatDistanceToNow from 'date-fns/formatDistanceToNow'; import Error from 'next/error'; import Head from 'next/head'; import { useRouter } from 'next/router'; -import { signIn, useSession } from 'next-auth/react'; +import { useSession } from 'next-auth/react'; import { useState } from 'react'; import { AcademicCapIcon, @@ -142,24 +142,21 @@ export default function ResumeReviewPage() { const renderReviewButton = () => { if (session === null) { return ( -
- { - event.preventDefault(); - signIn(); - }}> - Sign in to join discussion - -
+ +
- Star + {detailsQuery.data?.stars.length ? 'Starred' : 'Star'} {detailsQuery.data?._count.stars} -
{renderReviewButton()}
@@ -326,21 +323,17 @@ export default function ResumeReviewPage() {
-
- -
+
-
- value === sortOrder) - ?.label - }> - {SORT_OPTIONS.map(({ label, value }) => ( - setSortOrder(value)}> - ))} - -
- -
- -
+
{isFetchingResumes ? (