@@ -25,12 +25,14 @@ import PendingVotesBox from "./PendingVotesBox";
25
25
import RulingAndRewardsIndicators from "./RulingAndRewardsIndicators" ;
26
26
import VotesAccordion from "./VotesDetails" ;
27
27
28
- const Container = styled . div `` ;
28
+ const Container = styled . div `
29
+ display: flex;
30
+ flex-direction: column;
31
+ gap: ${ responsiveSize ( 16 , 24 ) } ;
32
+ ` ;
29
33
30
34
const StyledTabs = styled ( Tabs ) `
31
35
width: 100%;
32
- margin-bottom: 16px;
33
- margin-top: 48px;
34
36
` ;
35
37
36
38
const Header = styled . div `
@@ -40,7 +42,6 @@ const Header = styled.div`
40
42
align-items: center;
41
43
justify-content: space-between;
42
44
gap: 16px;
43
- margin-bottom: ${ responsiveSize ( 16 , 32 ) } ;
44
45
` ;
45
46
46
47
const StyledTitle = styled . h1 `
@@ -50,6 +51,14 @@ const StyledTitle = styled.h1`
50
51
const StyledReactMarkDown = styled ( ReactMarkdown ) `
51
52
max-width: inherit;
52
53
word-wrap: break-word;
54
+ p {
55
+ margin: 0;
56
+ }
57
+ ` ;
58
+
59
+ const TabsContainer = styled . div `
60
+ display: flex;
61
+ flex-direction: column;
53
62
` ;
54
63
55
64
const VotingHistory : React . FC < { arbitrable ?: `0x${string } `; isQuestion : boolean } > = ( { arbitrable, isQuestion } ) => {
@@ -75,6 +84,12 @@ const VotingHistory: React.FC<{ arbitrable?: `0x${string}`; isQuestion: boolean
75
84
76
85
return (
77
86
< Container >
87
+ { Boolean ( disputeData ?. dispute ?. ruled ) || jurorRewardsDispersed ? (
88
+ < RulingAndRewardsIndicators
89
+ ruled = { Boolean ( disputeData ?. dispute ?. ruled ) }
90
+ jurorRewardsDispersed = { jurorRewardsDispersed }
91
+ />
92
+ ) : null }
78
93
< Header >
79
94
< StyledTitle > Voting History</ StyledTitle >
80
95
< HowItWorks
@@ -94,30 +109,28 @@ const VotingHistory: React.FC<{ arbitrable?: `0x${string}`; isQuestion: boolean
94
109
) }
95
110
</ >
96
111
) }
97
- < RulingAndRewardsIndicators
98
- ruled = { Boolean ( disputeData ?. dispute ?. ruled ) }
99
- jurorRewardsDispersed = { jurorRewardsDispersed }
100
- />
101
- < StyledTabs
102
- currentValue = { currentTab }
103
- items = { rounds . map ( ( _ , i ) => ( {
104
- text : `Round ${ i + 1 } ` ,
105
- value : i ,
106
- } ) ) }
107
- callback = { ( i : number ) => setCurrentTab ( i ) }
108
- />
109
- < PendingVotesBox
110
- current = { localRounds . at ( currentTab ) ?. totalVoted }
111
- total = { rounds . at ( currentTab ) ?. nbVotes }
112
- court = { rounds . at ( currentTab ) ?. court . name ?? "" }
113
- />
114
- < VotesAccordion
115
- drawnJurors = { drawnJurors }
116
- period = { disputeData ?. dispute ?. period }
117
- answers = { answers }
118
- isActiveRound = { localRounds ?. length - 1 === currentTab }
119
- hiddenVotes = { Boolean ( disputeData ?. dispute ?. court . hiddenVotes ) }
120
- />
112
+ < TabsContainer >
113
+ < StyledTabs
114
+ currentValue = { currentTab }
115
+ items = { rounds . map ( ( _ , i ) => ( {
116
+ text : `Round ${ i + 1 } ` ,
117
+ value : i ,
118
+ } ) ) }
119
+ callback = { ( i : number ) => setCurrentTab ( i ) }
120
+ />
121
+ < PendingVotesBox
122
+ current = { localRounds . at ( currentTab ) ?. totalVoted }
123
+ total = { rounds . at ( currentTab ) ?. nbVotes }
124
+ court = { rounds . at ( currentTab ) ?. court . name ?? "" }
125
+ />
126
+ < VotesAccordion
127
+ drawnJurors = { drawnJurors }
128
+ period = { disputeData ?. dispute ?. period }
129
+ answers = { answers }
130
+ isActiveRound = { localRounds ?. length - 1 === currentTab }
131
+ hiddenVotes = { Boolean ( disputeData ?. dispute ?. court . hiddenVotes ) }
132
+ />
133
+ </ TabsContainer >
121
134
</ >
122
135
) : (
123
136
< Skeleton height = { 140 } />
0 commit comments