-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added verification
- Loading branch information
Showing
2 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"use client" | ||
import {useEffect} from "react"; | ||
import {RegistrationRest} from "../../src/rest/RegistrationRest"; | ||
import {Box, CircularProgress, Typography} from "@mui/material"; | ||
import {useRouter} from "next/navigation"; | ||
|
||
export default function Page() { | ||
|
||
const router = useRouter() | ||
|
||
useEffect(() => { | ||
if (typeof window !== 'undefined') { | ||
const queryParameters = new URLSearchParams(window?.location?.search) | ||
const type = queryParameters.get("token") | ||
const registrationRest = new RegistrationRest() | ||
registrationRest.verifyToken(type).then(() => router.push("/?isVerified=true")) | ||
} | ||
|
||
}, []); | ||
return <Box sx={{padding: 10, display: "flex", justifyContent: "center"}}> | ||
<Box align={"center"}> | ||
<CircularProgress color={"inherit"}/> | ||
<Typography>Verifying your Token</Typography> | ||
</Box> | ||
</Box> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters