Skip to content

Commit 11bc7e6

Browse files
authored
Merge pull request #1142 from kleros/fix(web)/crash-popup-error-when-voting
fix(web): crash popup error when voting
2 parents 8614b32 + 5d762cf commit 11bc7e6

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import React from "react";
2-
import VoteDescriptionEmphasizedDate from "components/Popup";
2+
import { VoteDescriptionEmphasizedDate } from "components/Popup";
33

44
interface IVoteWithCommit {
55
date: string;
66
}
77

88
const VoteWithCommit: React.FC<IVoteWithCommit> = ({ date }) => {
99
return (
10-
<>
10+
<div>
1111
Your vote is confirmed. It's kept secret until all jurors have cast their votes.
1212
<VoteDescriptionEmphasizedDate>
1313
You'll need to justify and reveal your vote on {date}
1414
</VoteDescriptionEmphasizedDate>
15-
</>
15+
</div>
1616
);
1717
};
1818
export default VoteWithCommit;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from "react";
2-
import VoteDescriptionEmphasizedDate from "components/Popup";
2+
import { VoteDescriptionEmphasizedDate } from "components/Popup";
33

44
interface IVoteWithoutCommit {
55
date: string;
66
}
77

88
const VoteWithoutCommit: React.FC<IVoteWithoutCommit> = ({ date }) => {
99
return (
10-
<>
10+
<div>
1111
The decision date is <VoteDescriptionEmphasizedDate>{date}</VoteDescriptionEmphasizedDate> with the possibility
1212
for appeals. After that time you will be informed about the jury decision.
13-
</>
13+
</div>
1414
);
1515
};
1616
export default VoteWithoutCommit;

web/src/components/Popup/ExtraInfo/VoteWithCommitExtraInfo.tsx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,33 @@ import InfoCircle from "tsx:svgs/icons/info-circle.svg";
44

55
const Container = styled.div`
66
display: flex;
7-
gap: 8px;
7+
gap: 4px;
88
text-align: center;
9-
align-items: center;
109
margin: 0 calc(8px + (32 - 8) * ((100vw - 300px) / (1250 - 300)));
1110
margin-top: calc(8px + (24 - 8) * ((100vw - 300px) / (1250 - 300)));
12-
small {
13-
font-size: 14px;
14-
font-weight: 400;
15-
color: ${({ theme }) => theme.secondaryText};
16-
line-height: 19px;
17-
}
11+
font-size: 14px;
12+
font-weight: 400;
13+
line-height: 19px;
14+
color: ${({ theme }) => theme.secondaryText};
1815
`;
1916

20-
const StyledInfoCircle = styled(InfoCircle)`
21-
min-width: 16px;
22-
min-height: 16px;
17+
const InfoCircleContainer = styled.div`
18+
display: flex;
19+
margin-top: 2px;
20+
21+
svg {
22+
min-width: 16px;
23+
min-height: 16px;
24+
}
2325
`;
2426

2527
const VoteWithCommitExtraInfo: React.FC = () => {
2628
return (
2729
<Container>
28-
<StyledInfoCircle />
29-
<small>Subscribe to receive notifications to be reminded when the reveal time comes.</small>
30+
<InfoCircleContainer>
31+
<InfoCircle />
32+
</InfoCircleContainer>
33+
Subscribe to receive notifications to be reminded when the reveal time comes.
3034
</Container>
3135
);
3236
};

0 commit comments

Comments
 (0)