MCPcopy Create free account
hub / github.com/Bitbox-Connect/Bitbox / handleVerification

Function handleVerification

client/src/component/Verify.jsx:14–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12 const navigate = useNavigate();
13
14 const handleVerification = () => {
15 fetch(`${VITE_SERVER_PORT}/api/auth/verify/${token}`, {
16 method: 'POST',
17 })
18 .then(response => {
19 if (response.status === 200) {
20 setIsVerified(true);
21 setModalMessage('Email verified! You can now log in.');
22 } else if (response.status === 400) {
23 setIsVerified(false);
24 setModalMessage('Invalid or expired verification link');
25 }
26 setShowModal(true);
27 })
28 .finally(() => {
29 setIsLoading(false);
30 });
31 };
32
33 useEffect(() => {
34 setIsLoading(true);

Callers 1

VerifyEmailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected