VerifyEmailPage.tsx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { Form, Head } from '@inertiajs/react';
  2. import { LoaderCircle } from 'lucide-react';
  3. import EmailVerificationNotificationController from '@/actions/App/Http/Controllers/Auth/EmailVerificationNotificationController';
  4. import { TextLink } from '@/common/TextLink';
  5. import AuthLayout from '@/pages/layouts/AuthLayout';
  6. import { logout } from '@/routes';
  7. import { Button } from '@/shadcn/button';
  8. export default function VerifyEmailPage({ status }: { status?: string }) {
  9. return (
  10. <AuthLayout title="Verify email" description="Please verify your email address by clicking on the link we just emailed to you.">
  11. <Head title="Email verification" />
  12. {status === 'verification-link-sent' && (
  13. <div className="mb-4 text-center text-sm font-medium text-green-600">
  14. A new verification link has been sent to the email address you provided during registration.
  15. </div>
  16. )}
  17. <Form {...EmailVerificationNotificationController.store.form()} className="space-y-6 text-center">
  18. {({ processing }) => (
  19. <>
  20. <Button disabled={processing} variant="secondary">
  21. {processing && <LoaderCircle className="h-4 w-4 animate-spin" />}
  22. Resend verification email
  23. </Button>
  24. <TextLink href={logout()} className="mx-auto block text-sm">
  25. Log out
  26. </TextLink>
  27. </>
  28. )}
  29. </Form>
  30. </AuthLayout>
  31. );
  32. }