feat: show synthetic email warning in AuthMethodsSection
This commit is contained in:
@@ -10,6 +10,8 @@ import { useMutation } from '@tanstack/react-query'
|
|||||||
import { useUnit } from 'effector-react'
|
import { useUnit } from 'effector-react'
|
||||||
import { useForm } from 'react-hook-form'
|
import { useForm } from 'react-hook-form'
|
||||||
import { useSearchParams } from 'react-router-dom'
|
import { useSearchParams } from 'react-router-dom'
|
||||||
|
import { getErrorMessage } from '@/shared/lib/get-error-message'
|
||||||
|
import { isSyntheticEmail } from '@/shared/lib/is-synthetic-email'
|
||||||
import {
|
import {
|
||||||
$user,
|
$user,
|
||||||
changePasswordFx,
|
changePasswordFx,
|
||||||
@@ -19,7 +21,6 @@ import {
|
|||||||
unlinkOAuthFx,
|
unlinkOAuthFx,
|
||||||
type AuthMethod,
|
type AuthMethod,
|
||||||
} from '@/shared/model/auth'
|
} from '@/shared/model/auth'
|
||||||
import { getErrorMessage } from '@/shared/lib/get-error-message'
|
|
||||||
|
|
||||||
const METHOD_LABELS: Record<string, string> = { password: 'Пароль', vk: 'ВКонтакте', yandex: 'Яндекс' }
|
const METHOD_LABELS: Record<string, string> = { password: 'Пароль', vk: 'ВКонтакте', yandex: 'Яндекс' }
|
||||||
|
|
||||||
@@ -117,6 +118,13 @@ export function AuthMethodsSection() {
|
|||||||
{user.email}
|
{user.email}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
|
{isSyntheticEmail(user.email) && (
|
||||||
|
<Alert severity="info" sx={{ mb: 2 }}>
|
||||||
|
Ваша почта сгенерирована автоматически. Без указания реальной почты вы не сможете получать уведомления о
|
||||||
|
заказах.
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
|
|
||||||
{!verificationUrl && (
|
{!verificationUrl && (
|
||||||
<Stack direction="row" spacing={1} sx={{ mb: 2 }}>
|
<Stack direction="row" spacing={1} sx={{ mb: 2 }}>
|
||||||
<TextField
|
<TextField
|
||||||
|
|||||||
Reference in New Issue
Block a user