Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

redesigned email verification page

Blue Mousead25e455814d
diff --git a/src/pages/Auth/VerifyEmail/index.jsx b/src/pages/Auth/VerifyEmail/index.jsx
index 1e61ff7a4..a49df9ff6 100644
--- a/src/pages/Auth/VerifyEmail/index.jsx
+++ b/src/pages/Auth/VerifyEmail/index.jsx
@@ -1,13 +1,15 @@
import React, { useState, useEffect, memo } from 'react'
import { useDispatch } from 'react-redux'
-import { useParams } from 'react-router-dom'
+import { useParams, Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
import _split from 'lodash/split'
+import _isString from 'lodash/isString'
import Title from 'components/Title'
import { authActions } from 'redux/actions/auth'
import Loader from 'ui/Loader'
+import routes from 'routes'
const VerifyEmail = () => {
const { t } = useTranslation('common')
@@ -25,7 +27,7 @@ const VerifyEmail = () => {
{ path, id },
() => setLoading(false),
(verifyError) => {
- setError(verifyError.message)
+ setError(_isString(verifyError) ? verifyError : verifyError.message)
setLoading(false)
},
),
@@ -45,18 +47,32 @@ const VerifyEmail = () => {
if (error) {
return (
<Title title={t('titles.verification')}>
- <div className='min-h-page bg-gray-50 dark:bg-gray-800'>
- <div className='flex justify-center pt-10'>
- <div className='rounded-md p-4 w-11/12 bg-red-50 lg:w-4/6'>
- <div className='flex'>
- <div className='flex-shrink-0'>
- <XCircleIcon className='h-5 w-5 text-red-400' aria-hidden='true' />
+ <div className='bg-gray-50 dark:bg-gray-800 min-h-page px-4 py-16 sm:px-6 sm:py-24 md:grid md:place-items-center lg:px-8'>
+ <div className='max-w-max mx-auto'>
+ <main className='sm:flex'>
+ <XCircleIcon className='h-12 w-12 text-red-400' aria-hidden='true' />
+ <div className='sm:ml-6'>
+ <div className='sm:border-l max-w-prose sm:border-gray-200 sm:pl-6'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight sm:text-5xl'>
+ {error}
+ </h1>
</div>
- <div className='ml-3'>
- <h3 className='text-sm font-medium text-red-800 dark:text-red-500'>{error}</h3>
+ <div className='mt-8 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6'>
+ <Link
+ to={routes.dashboard}
+ className='inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500'
+ >
+ {t('common.dashboard')}
+ </Link>
+ <Link
+ to={routes.contact}
+ className='inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-indigo-700 bg-indigo-100 hover:bg-indigo-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:text-gray-50 dark:bg-gray-700 dark:hover:bg-gray-600 dark:focus:ring-gray-50'
+ >
+ {t('notFoundPage.support')}
+ </Link>
</div>
</div>
- </div>
+ </main>
</div>
</div>
</Title>
@@ -65,20 +81,26 @@ const VerifyEmail = () => {
return (
<Title title={t('titles.verification')}>
- <div className='min-h-page bg-gray-50 dark:bg-gray-800'>
- <div className='flex justify-center pt-10'>
- <div className='rounded-md p-4 w-11/12 bg-green-50 lg:w-4/6'>
- <div className='flex'>
- <div className='flex-shrink-0'>
- <CheckCircleIcon className='h-5 w-5 text-green-400' aria-hidden='true' />
- </div>
- <div className='ml-3'>
- <h3 className='text-sm font-medium text-green-800 dark:text-green-500'>
+ <div className='bg-gray-50 dark:bg-gray-800 min-h-page px-4 py-16 sm:px-6 sm:py-24 md:grid md:place-items-center lg:px-8'>
+ <div className='max-w-max mx-auto'>
+ <main className='sm:flex'>
+ <CheckCircleIcon className='h-12 w-12 text-green-500 dark:text-green-400' aria-hidden='true' />
+ <div className='sm:ml-6'>
+ <div className='sm:border-l max-w-prose sm:border-gray-200 sm:pl-6'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight sm:text-5xl'>
{t('auth.verification.success')}
- </h3>
+ </h1>
+ </div>
+ <div className='mt-8 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6'>
+ <Link
+ to={routes.dashboard}
+ className='inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500'
+ >
+ {t('common.dashboard')}
+ </Link>
</div>
</div>
- </div>
+ </main>
</div>
</div>
</Title>