show cid instead of pending

This commit is contained in:
plebeius.eth
2023-06-15 15:50:13 +02:00
parent cb90be9d1a
commit 823eba8ca6
3 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -14,9 +14,11 @@ const PendingLabel = ({ commentIndex }) => {
}, []); }, []);
if (commentIndex === undefined) return null; if (commentIndex === undefined) return null;
return ( return (
commentIndex && stateString !== "Succeeded" ? ( comment.cid ? (
<span>{comment.cid.slice(2, 14)}</span>
) : (
(comment.state === "failed" || (stateString === undefined && !isLoading)) ? ( (comment.state === "failed" || (stateString === undefined && !isLoading)) ? (
<span style={{color: 'red', fontWeight: '700'}}> <span style={{color: 'red', fontWeight: '700'}}>
Failed Failed
@@ -26,7 +28,7 @@ const PendingLabel = ({ commentIndex }) => {
Pending Pending
</span> </span>
) )
) : null )
); );
}; };
+1 -1
View File
@@ -17,7 +17,7 @@ const StateLabel = ({ commentIndex, className }) => {
return ( return (
commentIndex && stateString !== "Succeeded" ? ( commentIndex && stateString !== "Succeeded" ? (
(comment.state === "failed" || (stateString === undefined && !isLoading)) ? ( (comment.state === "failed" || (stateString === undefined && !isLoading && comment.cid === undefined)) ? (
<span className="ttl"> <span className="ttl">
<br /> <br />
( (
+1 -1
View File
@@ -238,7 +238,7 @@ const Thread = () => {
setNewSuccessMessage('Challenge Success'); setNewSuccessMessage('Challenge Success');
} }
} else if (challengeVerification.challengeSuccess === false) { } else if (challengeVerification.challengeSuccess === false) {
setNewErrorMessage('challenge failed', {reason: challengeVerification.reason, errors: challengeVerification.errors}); setNewErrorMessage('Challenge Failed', {reason: challengeVerification.reason, errors: challengeVerification.errors});
} }
}; };