@@ -40,7 +40,7 @@ export const VoteContextGovTool = ({
4040
4141 const openLink = ( ) => openInNewTab ( LINKS . STORING_INFORMATION_OFFLINE ) ;
4242
43- const { mutate, isLoading } = useMutation < PostIpfsResponse , Error , { content : string } > ( {
43+ const { mutate, isLoading , isError } = useMutation < PostIpfsResponse , Error , { content : string } > ( {
4444 mutationFn : postIpfs ,
4545 onSuccess : ( data ) => {
4646 const ipfsUrl = `ipfs://${ data . ipfsCid } ` ;
@@ -69,6 +69,7 @@ export const VoteContextGovTool = ({
6969 onContinue = { ( ) => { setStep ( 5 ) } }
7070 useBackLabel
7171 isContinueDisabled = { ! apiResponse }
72+ isVoteWithMetadata
7273 >
7374 < Typography sx = { { textAlign : "center" , fontSize : "28px" , fontWeight : 500 } } variant = "h4" >
7475 { t ( "createGovernanceAction.rationalePinnedToIPFS" ) }
@@ -87,7 +88,11 @@ export const VoteContextGovTool = ({
8788 >
8889 { t ( "createGovernanceAction.learnMore" ) }
8990 </ Link >
90- { isLoading ? (
91+ { isError ? (
92+ < Typography sx = { { textAlign : "center" , color : "error.main" , mt : 2 } } variant = "body1" >
93+ { t ( "createGovernanceAction.uploadToIPFSError" ) }
94+ </ Typography >
95+ ) : isLoading ? (
9196 < Box sx = { { display : "flex" , justifyContent : "center" } } >
9297 < CircularProgress size = { 24 } />
9398 </ Box >
@@ -129,7 +134,7 @@ export const VoteContextGovTool = ({
129134 </ Typography >
130135 </ Box >
131136 </ >
132- ) : (
137+ ) : (
133138 < Typography sx = { { textAlign : "center" } } variant = "body1" >
134139 { t ( "createGovernanceAction.uploadingToIPFS" ) }
135140 </ Typography >
0 commit comments