Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timthedev07 committed Jan 26, 2024
1 parent d0c59de commit 926733f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/components/answer-display/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ export const AnswerListItem: FC<AnswerListItemProps> = ({
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);

Expand Down

0 comments on commit 926733f

Please sign in to comment.