Implemented email verification

This commit is contained in:
2024-04-12 13:52:16 +03:00
parent 78107d4ec7
commit b1ad7b5c3e
51 changed files with 604 additions and 213 deletions

View File

@@ -10,9 +10,9 @@ import {
useFormContext,
} from 'react-hook-form'
import { cn } from '@/lib/utils'
import { cn, env } from '@/lib/utils'
import { Label } from '@/components/ui/label'
import TranslateClientFragment from '@/components/TranslateClientFragment'
import TranslateClientFragment from '@/components/translate-client-fragment'
const Form = FormProvider
@@ -132,8 +132,7 @@ const FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<
className={cn('text-sm font-medium text-destructive', className)}
{...props}
>
{!process.env.IS_SERVER_FLAG && typeof body === 'string' &&
body.includes('schema.message')
{!env('IS_SERVER_FLAG') && typeof body === 'string' && body.match(/^(|\[")schema\./)
? <TranslateClientFragment message={body}/>
: body}
</p>)