Skip to content

Commit d3a1293

Browse files
committed
chore: better return structure
1 parent 4a72da5 commit d3a1293

File tree

1 file changed

+8
-9
lines changed
  • web/src/pages/Cases/CaseDetails/Voting/Shutter

1 file changed

+8
-9
lines changed

web/src/pages/Cases/CaseDetails/Voting/Shutter/index.tsx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ const Shutter: React.FC<IShutter> = ({ arbitrable, setIsOpen, dispute, currentPe
2929
const shouldShowCommit = id && isCommitPeriod && !commited;
3030
const shouldShowReveal = id && isVotingPeriod;
3131

32-
if (shouldShowCommit) {
33-
return <ShutterCommit {...{ arbitrable, setIsOpen, voteIDs, refetch, dispute, currentPeriodIndex, isGated }} />;
34-
}
35-
36-
if (shouldShowReveal) {
37-
return <Reveal {...{ setIsOpen, voteIDs, isGated }} />;
38-
}
39-
40-
return null;
32+
return (
33+
<>
34+
{shouldShowCommit && (
35+
<ShutterCommit {...{ arbitrable, setIsOpen, voteIDs, refetch, dispute, currentPeriodIndex, isGated }} />
36+
)}
37+
{shouldShowReveal && <Reveal {...{ setIsOpen, voteIDs, isGated }} />}
38+
</>
39+
);
4140
};
4241

4342
export default Shutter;

0 commit comments

Comments
 (0)