From 3534f59dc3c4d0709d44f953863ac9af64ced885 Mon Sep 17 00:00:00 2001 From: nicolasito1411 <60229704+Marchand-Nicolas@users.noreply.github.com> Date: Wed, 11 Oct 2023 21:24:52 +0200 Subject: [PATCH] fix: task opens on click verify button --- components/quests/task.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/quests/task.tsx b/components/quests/task.tsx index 368e09e6..4da9885e 100644 --- a/components/quests/task.tsx +++ b/components/quests/task.tsx @@ -49,9 +49,8 @@ const Task: FunctionComponent = ({ }; // A verify function that setIsVerified(true) and stop propagation - const verify = async (e?: React.MouseEvent) => { + const verify = async () => { checkCanDoTask(); - if (e) e.stopPropagation(); setIsLoading(true); if (verifyEndpointType.startsWith("oauth")) { @@ -159,11 +158,12 @@ const Task: FunctionComponent = ({ ) : (
{ + e.stopPropagation(); if (!address) return setError("Please connect your wallet first"); if (!hasRootDomain) return setShowDomainPopup(true); if (verifyEndpointType === "quiz") return openTask(); if (verifyRedirect) window.open(verifyRedirect); - verify(e); + verify(); }} className={styles.verifyButton} >