Skip to content

Commit 60a023f

Browse files
committed
fix: code smell
1 parent c9fbae7 commit 60a023f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

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

46+
const Icon: React.FC<{ seed: number }> = ({ seed }) => <Jazzicon diameter={24} seed={seed} />;
47+
4648
const AccordionContent: React.FC<{
4749
choice: string;
4850
justification: string;
@@ -108,7 +110,7 @@ const VotingHistory: React.FC<{ arbitrable?: string }> = ({ arbitrable }) => {
108110
items={
109111
localRounds.at(currentTab)?.votes.map((vote) => ({
110112
title: shortenAddress(vote.juror.id),
111-
Icon: <Jazzicon diameter={24} seed={jsNumberForAddress(vote.juror.id)} />,
113+
Icon: () => <Icon seed={jsNumberForAddress(vote.juror.id)} />,
112114
body: (
113115
<AccordionContent
114116
choice={vote.choice === 0 ? "Refuse to arbitrate" : disputeTemplate.answers[vote.choice - 1].title}

0 commit comments

Comments
 (0)