@@ -9,6 +9,7 @@ import ArrowIcon from "svgs/icons/arrow.svg";
99
1010import { REFETCH_INTERVAL } from "consts/index" ;
1111import { Periods } from "consts/periods" ;
12+ import { DEFAULT_CHAIN } from "consts/chains" ;
1213import { useReadKlerosCoreCurrentRuling } from "hooks/contracts/generated" ;
1314import { usePopulatedDisputeData } from "hooks/queries/usePopulatedDisputeData" ;
1415import { useVotingHistory } from "hooks/queries/useVotingHistory" ;
@@ -41,6 +42,14 @@ const JuryContainer = styled.div`
4142 }
4243` ;
4344
45+ const VerdictContainer = styled . div `
46+ display: flex;
47+ flex-direction: row;
48+ align-items: center;
49+ flex-wrap: wrap;
50+ gap: ${ responsiveSize ( 6 , 8 ) } ;
51+ ` ;
52+
4453const JuryDecisionTag = styled . small `
4554 font-weight: 400;
4655 line-height: 19px;
@@ -51,6 +60,15 @@ const StyledDivider = styled(Divider)`
5160 margin: ${ responsiveSize ( 16 , 24 ) } 0px;
5261` ;
5362
63+ const ReStyledArrowLink = styled ( StyledArrowLink ) `
64+ font-size: 14px;
65+
66+ > svg {
67+ height: 15px;
68+ width: 15px;
69+ }
70+ ` ;
71+
5472interface IFinalDecision {
5573 arbitrable ?: `0x${string } `;
5674}
@@ -68,6 +86,7 @@ const FinalDecision: React.FC<IFinalDecision> = ({ arbitrable }) => {
6886 const { data : currentRulingArray } = useReadKlerosCoreCurrentRuling ( {
6987 query : { refetchInterval : REFETCH_INTERVAL } ,
7088 args : [ BigInt ( id ?? 0 ) ] ,
89+ chainId : DEFAULT_CHAIN ,
7190 } ) ;
7291 const currentRuling = Number ( currentRulingArray ?. [ 0 ] ) ;
7392 const answer = populatedDisputeData ?. answers ?. [ currentRuling ! - 1 ] ;
@@ -81,27 +100,28 @@ const FinalDecision: React.FC<IFinalDecision> = ({ arbitrable }) => {
81100
82101 return (
83102 < Container >
84- < VerdictBanner ruled = { ruled } />
85-
86- { ruled && (
87- < JuryContainer >
88- < JuryDecisionTag > The jury decided in favor of:</ JuryDecisionTag >
89- < AnswerDisplay { ...{ answer, currentRuling } } />
90- </ JuryContainer >
91- ) }
92- { ! ruled && periodIndex > 1 && localRounds ?. at ( localRounds . length - 1 ) ?. totalVoted > 0 && (
93- < JuryContainer >
94- < JuryDecisionTag > This option is winning:</ JuryDecisionTag >
95- < AnswerDisplay { ...{ answer, currentRuling } } />
96- </ JuryContainer >
97- ) }
103+ < VerdictContainer >
104+ < VerdictBanner ruled = { ruled } />
105+ { ruled && (
106+ < JuryContainer >
107+ < JuryDecisionTag > The jury decided in favor of:</ JuryDecisionTag >
108+ < AnswerDisplay { ...{ answer, currentRuling } } />
109+ </ JuryContainer >
110+ ) }
111+ { ! ruled && periodIndex > 1 && localRounds ?. at ( localRounds . length - 1 ) ?. totalVoted > 0 && (
112+ < JuryContainer >
113+ < JuryDecisionTag > This option is winning:</ JuryDecisionTag >
114+ < AnswerDisplay { ...{ answer, currentRuling } } />
115+ </ JuryContainer >
116+ ) }
117+ </ VerdictContainer >
98118 < StyledDivider />
99119 { isLoading && ! isDisconnected ? (
100120 < Skeleton width = { 250 } height = { 20 } />
101121 ) : (
102- < StyledArrowLink to = { `/cases/${ id ?. toString ( ) } /voting` } >
122+ < ReStyledArrowLink to = { `/cases/${ id ?. toString ( ) } /voting` } >
103123 { buttonText } < ArrowIcon />
104- </ StyledArrowLink >
124+ </ ReStyledArrowLink >
105125 ) }
106126 </ Container >
107127 ) ;
0 commit comments