You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import Head from 'next/head'
|
|
|
|
import Link from 'next/link'
|
|
|
|
import {Button, FormController} from '~/components/form'
|
|
|
|
import Router from 'next/router'
|
|
|
|
|
|
|
|
import useUser from '~/hooks/useUser'
|
|
|
|
|
|
|
|
|
|
|
|
export default function InvalidEmail() {
|
|
|
|
const user = useUser()
|
|
|
|
|
|
|
|
if(user.email_confirmed)
|
|
|
|
Router.push('/account')
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Head>
|
|
|
|
<title>Invalid Link | Society of Socks</title>
|
|
|
|
</Head>
|
|
|
|
<h2>Invalid Confirmation Link</h2>
|
|
|
|
<p>
|
|
|
|
Sorry, but the email confirmation link you used was invalid or expired.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
If you've gotten this error before,
|
|
|
|
please <Link href="/contact"><a>contact us</a></Link> so we can help
|
|
|
|
resolve it. Otherwise, feel free to try sending the email again.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<FormController url="/api/email" afterSubmit={() => {window.location.href = '/account/email/confirm'}}>
|
|
|
|
<Button type="submit">Resend Email</Button>
|
|
|
|
</FormController>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|