Skip to content

Commit e34ed7a

Browse files
committed
refactor(web): single-ensure-chain-button
1 parent 6d752f3 commit e34ed7a

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

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

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import { Answer } from "@kleros/kleros-sdk";
1717
const MainContainer = styled.div`
1818
width: 100%;
1919
height: auto;
20+
display: flex;
21+
flex-direction: column;
2022
`;
2123

2224
const OptionsContainer = styled.div`
@@ -40,6 +42,9 @@ const RefuseToArbitrateContainer = styled.div`
4042
justify-content: center;
4143
`;
4244

45+
const StyledEnsureChain = styled(EnsureChain)`
46+
align-self: center;
47+
`;
4348
interface IOptions {
4449
arbitrable: `0x${string}`;
4550
handleSelection: (arg0: bigint) => Promise<void>;
@@ -77,20 +82,20 @@ const Options: React.FC<IOptions> = ({ arbitrable, handleSelection, justificatio
7782
{!isUndefined(justification) && !isUndefined(setJustification) ? (
7883
<JustificationArea {...{ justification, setJustification }} />
7984
) : null}
80-
<OptionsContainer>
81-
{disputeDetails?.answers?.map((answer: Answer) => {
82-
return (
83-
<EnsureChain key={answer.title}>
85+
<StyledEnsureChain>
86+
<OptionsContainer>
87+
{disputeDetails?.answers?.map((answer: Answer) => {
88+
return (
8489
<Button
8590
text={answer.title}
8691
disabled={isSending}
8792
isLoading={chosenOption === BigInt(answer.id)}
8893
onClick={() => onClick(BigInt(answer.id))}
8994
/>
90-
</EnsureChain>
91-
);
92-
})}
93-
</OptionsContainer>
95+
);
96+
})}
97+
</OptionsContainer>
98+
</StyledEnsureChain>
9499
</MainContainer>
95100
{showRTA ? (
96101
<RefuseToArbitrateContainer>

0 commit comments

Comments
 (0)