Skip to content

Commit decdda8

Browse files
committed
refactor(web): chain-check-for-reveal-button
1 parent 07c46dc commit decdda8

File tree

1 file changed

+14
-7
lines changed
  • web/src/pages/Cases/CaseDetails/Voting/Classic

1 file changed

+14
-7
lines changed

web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import InfoCard from "components/InfoCard";
2121

2222
import JustificationArea from "./JustificationArea";
2323
import { Answer } from "@kleros/kleros-sdk";
24+
import { EnsureChain } from "components/EnsureChain";
2425

2526
const Container = styled.div`
2627
width: 100%;
@@ -35,6 +36,10 @@ const StyledButton = styled(Button)`
3536
margin: 16px auto;
3637
`;
3738

39+
const StyledEnsureChain = styled(EnsureChain)`
40+
margin: 8px auto;
41+
`;
42+
3843
const ReactMarkdownWrapper = styled.div``;
3944
interface IReveal {
4045
arbitrable: `0x${string}`;
@@ -106,13 +111,15 @@ const Reveal: React.FC<IReveal> = ({ arbitrable, voteIDs, setIsOpen, commit, isR
106111
<ReactMarkdown>{disputeDetails?.question ?? ""}</ReactMarkdown>
107112
</ReactMarkdownWrapper>
108113
<JustificationArea {...{ justification, setJustification }} />
109-
<StyledButton
110-
variant="secondary"
111-
text="Justify & Reveal"
112-
disabled={isSending || isUndefined(disputeDetails)}
113-
isLoading={isSending}
114-
onClick={handleReveal}
115-
/>
114+
<StyledEnsureChain>
115+
<StyledButton
116+
variant="secondary"
117+
text="Justify & Reveal"
118+
disabled={isSending || isUndefined(disputeDetails)}
119+
isLoading={isSending}
120+
onClick={handleReveal}
121+
/>
122+
</StyledEnsureChain>
116123
</>
117124
) : (
118125
<StyledInfoCard msg="Your vote was successfully commited, please wait until reveal period to reveal it." />

0 commit comments

Comments
 (0)