@@ -18,6 +18,7 @@ import { getPeriodEndTimestamp } from "components/DisputeCard";
18
18
import InfoCard from "components/InfoCard" ;
19
19
import Classic from "./Classic" ;
20
20
import VotingHistory from "./VotingHistory" ;
21
+ import Skeleton from "react-loading-skeleton" ;
21
22
22
23
const Container = styled . div `
23
24
padding: ${ responsiveSize ( 16 , 32 ) } ;
@@ -40,7 +41,11 @@ const Voting: React.FC<IVoting> = ({ arbitrable, currentPeriodIndex }) => {
40
41
const { id } = useParams ( ) ;
41
42
const { data : disputeData } = useDisputeDetailsQuery ( id ) ;
42
43
const { data : appealCost } = useAppealCost ( id ) ;
43
- const { data : drawData } = useDrawQuery ( address ?. toLowerCase ( ) , id , disputeData ?. dispute ?. currentRound . id ) ;
44
+ const { data : drawData , isLoading : isDrawDataLoading } = useDrawQuery (
45
+ address ?. toLowerCase ( ) ,
46
+ id ,
47
+ disputeData ?. dispute ?. currentRound . id
48
+ ) ;
44
49
const roundId = disputeData ?. dispute ?. currentRoundIndex ;
45
50
const voteId = drawData ?. draws ?. [ 0 ] ?. voteIDNum ;
46
51
const { data : voted } = useDisputeKitClassicIsVoteActive ( {
@@ -68,12 +73,17 @@ const Voting: React.FC<IVoting> = ({ arbitrable, currentPeriodIndex }) => {
68
73
< br />
69
74
</ >
70
75
) }
71
- { ! userWasDrawn ? (
76
+
77
+ { userWasDrawn ? null : (
72
78
< >
73
- < InfoCard msg = "You were not drawn in current round." />
79
+ { isDrawDataLoading ? (
80
+ < Skeleton width = { 300 } height = { 20 } />
81
+ ) : (
82
+ < InfoCard msg = "You were not drawn in current round." />
83
+ ) }
74
84
< br />
75
85
</ >
76
- ) : null }
86
+ ) }
77
87
78
88
{ isPopupOpen && (
79
89
< Popup
0 commit comments