Skip to content

Commit

Permalink
feat(verification): Added login form to verification page
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeffer committed Dec 8, 2023
1 parent 7224c59 commit 8ea7e78
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/VerifyEmail/VerifyEmail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {useMutation} from '@tanstack/react-query'
import axios from 'axios'
import {useRouter} from 'next/router'
import {FC, useEffect} from 'react'
import {LoginForm} from '../PageLayout/LoginForm/LoginForm'

export const VerifyEmail: FC = () => {
const router = useRouter()
Expand All @@ -15,5 +16,14 @@ export const VerifyEmail: FC = () => {
typeof verificationKey === 'string' && verifyEmail(verificationKey)
}, [verificationKey, verifyEmail])

return <>isEmailVerified = {String(isEmailVerified)}</>

if (!isEmailVerified)
return <>I am a temporary email verification error. Please put me out of my misery.</>

return (
<>
<p>Pre dokončenie overenia emailu sa prihláste</p>
<LoginForm closeOverlay={()=>{ router.push("/") }}/>
</>
)
}

0 comments on commit 8ea7e78

Please sign in to comment.