From 926733f0c04c72903beb6ac73e2d0edd2b5b3bc5 Mon Sep 17 00:00:00 2001 From: timthedev07 Date: Fri, 26 Jan 2024 23:45:45 +0100 Subject: [PATCH] fix --- app/src/components/answer-display/Item.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/components/answer-display/Item.tsx b/app/src/components/answer-display/Item.tsx index 82ac914..1ffc0d7 100644 --- a/app/src/components/answer-display/Item.tsx +++ b/app/src/components/answer-display/Item.tsx @@ -59,7 +59,12 @@ export const AnswerListItem: FC = ({ const canEdit = Boolean( session?.user && data.answerer?.username === session.user.username ); - const canAccept = Boolean(!data.accepted && !isAnswered && canEdit); + const canAccept = Boolean( + !data.accepted && + !isAnswered && + canEdit && + data.answererId !== session?.user.id + ); const moderated = data.moderated && !!moderations && moderations.some((v) => v.approval);