File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
pages/Cases/CaseDetails/Voting Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ const votingHistoryQuery = graphql(`
1212 dispute(id: $disputeID) {
1313 id
1414 createdAt
15+ ruled
1516 rounds {
1617 nbVotes
18+ jurorRewardsDispersed
1719 court {
1820 id
1921 name
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import styled from "styled-components" ;
3+
4+ import CheckCircle from "svgs/icons/check-circle-outline.svg" ;
5+ import Coins from "svgs/icons/pile-coins.svg" ;
6+
7+ import Label from "components/DisputeView/CardLabels/Label" ;
8+
9+ const Container = styled . div `
10+ display: flex;
11+ gap: 8px;
12+ flex-wrap: wrap;
13+ ` ;
14+
15+ interface IRulingAndRewardsIndicators {
16+ jurorRewardsDispersed : boolean ;
17+ ruled : boolean ;
18+ }
19+
20+ const RulingAndRewardsIndicators : React . FC < IRulingAndRewardsIndicators > = ( { jurorRewardsDispersed, ruled } ) => (
21+ < Container >
22+ { ruled ? < Label icon = { CheckCircle } text = "Ruling executed" color = "green" /> : null }
23+ { jurorRewardsDispersed ? < Label icon = { Coins } text = "Juror rewards distributed" color = "green" /> : null }
24+ </ Container >
25+ ) ;
26+
27+ export default RulingAndRewardsIndicators ;
Original file line number Diff line number Diff line change @@ -22,13 +22,15 @@ import HowItWorks from "components/HowItWorks";
2222import BinaryVoting from "components/Popup/MiniGuides/BinaryVoting" ;
2323
2424import PendingVotesBox from "./PendingVotesBox" ;
25+ import RulingAndRewardsIndicators from "./RulingAndRewardsIndicators" ;
2526import VotesAccordion from "./VotesDetails" ;
2627
2728const Container = styled . div `` ;
2829
2930const StyledTabs = styled ( Tabs ) `
3031 width: 100%;
3132 margin-bottom: 16px;
33+ margin-top: 48px;
3234` ;
3335
3436const Header = styled . div `
@@ -69,6 +71,8 @@ const VotingHistory: React.FC<{ arbitrable?: `0x${string}`; isQuestion: boolean
6971 [ votingHistory , currentTab ]
7072 ) ;
7173
74+ const jurorRewardsDispersed = useMemo ( ( ) => Boolean ( rounds ?. every ( ( round ) => round . jurorRewardsDispersed ) ) , [ rounds ] ) ;
75+
7276 return (
7377 < Container >
7478 < Header >
@@ -90,6 +94,10 @@ const VotingHistory: React.FC<{ arbitrable?: `0x${string}`; isQuestion: boolean
9094 ) }
9195 </ >
9296 ) }
97+ < RulingAndRewardsIndicators
98+ ruled = { Boolean ( disputeData ?. dispute ?. ruled ) }
99+ jurorRewardsDispersed = { jurorRewardsDispersed }
100+ />
93101 < StyledTabs
94102 currentValue = { currentTab }
95103 items = { rounds . map ( ( _ , i ) => ( {
You can’t perform that action at this time.
0 commit comments