48 lines
1.6 KiB
TypeScript
48 lines
1.6 KiB
TypeScript
// Components
|
|
import { Form, Head } from '@inertiajs/react';
|
|
import TextLink from '@/components/text-link';
|
|
import { Button } from '@/components/ui/button';
|
|
import { Spinner } from '@/components/ui/spinner';
|
|
import { logout } from '@/routes';
|
|
import { send } from '@/routes/verification';
|
|
|
|
export default function VerifyEmail({ status }: { status?: string }) {
|
|
return (
|
|
<>
|
|
<Head title="Confirmação de email" />
|
|
|
|
{status === 'verification-link-sent' && (
|
|
<div className="mb-4 text-center text-sm font-medium text-green-600">
|
|
{' '}
|
|
Foi enviada uma nova ligação de confirmação para o email
|
|
indicado no registo.{' '}
|
|
</div>
|
|
)}
|
|
|
|
<Form {...send.form()} className="space-y-6 text-center">
|
|
{({ processing }) => (
|
|
<>
|
|
<Button disabled={processing} variant="secondary">
|
|
{processing && <Spinner />} Reenviar email de
|
|
confirmação{' '}
|
|
</Button>
|
|
|
|
<TextLink
|
|
href={logout()}
|
|
className="mx-auto block text-sm"
|
|
>
|
|
{' '}
|
|
Terminar sessão{' '}
|
|
</TextLink>
|
|
</>
|
|
)}
|
|
</Form>
|
|
</>
|
|
);
|
|
}
|
|
|
|
VerifyEmail.layout = {
|
|
title: 'Confirmação de email',
|
|
description: 'Confirme o seu email através da ligação que enviámos.',
|
|
};
|