mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 04:33:42 +08:00
[resumes][refactor] Comment UI touchup (#405)
* [resumes][refactor] add vertical line to replies * [resumes][refactor] sort replies ascending Co-authored-by: Terence Ho <>
This commit is contained in:
@ -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: {
|
||||
|
Reference in New Issue
Block a user