Skip to content

Commit abc336f

Browse files
committed
fix: code smell fix again
1 parent fadd80c commit abc336f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

web/src/pages/Cases/CaseDetails/Voting/VotingHistory.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ const StyledAccordion = styled(Accordion)`
4343
}
4444
`;
4545

46-
const Icon: React.FC<{ seed: number }> = React.memo(({ seed }) => <Jazzicon diameter={24} seed={seed} />);
47-
4846
const AccordionContent: React.FC<{
4947
choice: string;
5048
justification: string;
@@ -110,7 +108,7 @@ const VotingHistory: React.FC<{ arbitrable?: string }> = ({ arbitrable }) => {
110108
items={
111109
localRounds.at(currentTab)?.votes.map((vote) => ({
112110
title: shortenAddress(vote.juror.id),
113-
Icon: () => <Icon seed={jsNumberForAddress(vote.juror.id)} />,
111+
Icon: React.useMemo(() => () => <Jazzicon seed={jsNumberForAddress(vote.juror.id)} />, [vote.juror.id]),
114112
body: (
115113
<AccordionContent
116114
choice={vote.choice === 0 ? "Refuse to arbitrate" : disputeTemplate.answers[vote.choice - 1].title}

0 commit comments

Comments
 (0)