Implemented email verification
This commit is contained in:
@@ -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>)
|
||||
|
||||
Reference in New Issue
Block a user