Skip to content

Commit 812a40c

Browse files
committed
fix: remove activateAccount from useEffect deps to prevent unnecessary re-renders
1 parent e94588a commit 812a40c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pages/ActivateAccount.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ export default function ActivateAccount() {
3030
}
3131
};
3232

33+
// Only run once when component mounts with a token
3334
performActivation();
34-
}, [token, activateAccount])
35+
// eslint-disable-next-line react-hooks/exhaustive-deps
36+
}, [token]) // Removed activateAccount from dependencies
3537

3638
return (
3739
<div className="flex min-h-screen items-center justify-center p-4">

0 commit comments

Comments
 (0)