[resumes][refactor] Comment UI touchup (#405)

* [resumes][refactor] add vertical line to replies

* [resumes][refactor] sort replies ascending

Co-authored-by: Terence Ho <>
pull/407/head
Terence 2 years ago committed by GitHub
parent 817f1d5705
commit f123ffa7e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -144,16 +144,25 @@ export default function ResumeCommentListItem({
<span>{showReplies ? 'Hide replies' : 'Show replies'}</span>
</button>
{showReplies &&
comment.children.map((child) => {
return (
<ResumeCommentListItem
key={child.id}
comment={child}
userId={userId}
/>
);
})}
{showReplies && (
<div className="flex flex-row">
<div className="relative flex flex-col px-2 py-2">
<div className="flex-grow border-r border-gray-300" />
</div>
<div className="flex flex-col space-y-1">
{comment.children.map((child) => {
return (
<ResumeCommentListItem
key={child.id}
comment={child}
userId={userId}
/>
);
})}
</div>
</div>
)}
</div>
)}
</div>

@ -97,7 +97,9 @@ export default function ResumeCommentVoteButtons({
/>
</button>
<div className="text-xs">{commentVotesQuery.data?.numVotes ?? 0}</div>
<div className="flex min-w-[1rem] justify-center text-xs">
{commentVotesQuery.data?.numVotes ?? 0}
</div>
<button
disabled={

@ -25,7 +25,7 @@ export const resumeCommentsRouter = createRouter().query('list', {
},
},
orderBy: {
createdAt: 'desc',
createdAt: 'asc',
},
},
user: {

Loading…
Cancel
Save