[resumes][fix] fix reply comments (#407)

Co-authored-by: Terence Ho <>
This commit is contained in:
Terence
2022-10-21 23:14:57 +08:00
committed by GitHub
parent 2729e20351
commit dac178e712

View File

@ -96,15 +96,17 @@ export default function ResumeCommentListItem({
<div className="flex flex-row space-x-1 pt-1 align-middle"> <div className="flex flex-row space-x-1 pt-1 align-middle">
<ResumeCommentVoteButtons commentId={comment.id} userId={userId} /> <ResumeCommentVoteButtons commentId={comment.id} userId={userId} />
{/* Action buttons; only present when not editing/replying */} {/* Action buttons; only present for authenticated user when not editing/replying */}
{isCommentOwner && !isEditingComment && !isReplyingComment && ( {userId && !isEditingComment && !isReplyingComment && (
<> <>
<button {isCommentOwner && (
className="px-1 text-xs text-indigo-800 hover:text-indigo-400" <button
type="button" className="px-1 text-xs text-indigo-800 hover:text-indigo-400"
onClick={() => setIsEditingComment(true)}> type="button"
Edit onClick={() => setIsEditingComment(true)}>
</button> Edit
</button>
)}
{!comment.parentId && ( {!comment.parentId && (
<button <button