fix: скрыть плашку верификации email при выключенной верификации

- Добавлен verification_enabled в EmailAuthEnabled тип
- Баннер "Подтвердите email" скрыт когда верификация выключена
- Бейдж "Не подтверждён" скрыт когда верификация выключена
This commit is contained in:
Fringg
2026-03-18 01:53:10 +03:00
parent b35000367b
commit 11e81917af
2 changed files with 5 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ export interface FullscreenEnabled {
export interface EmailAuthEnabled {
enabled: boolean;
verification_enabled?: boolean;
}
export interface GiftEnabled {

View File

@@ -107,6 +107,7 @@ export default function Profile() {
staleTime: 60000,
});
const isEmailAuthEnabled = emailAuthConfig?.enabled ?? true;
const isEmailVerificationEnabled = emailAuthConfig?.verification_enabled ?? true;
// Build referral link for cabinet
const referralLink = referralInfo?.referral_code
@@ -474,13 +475,13 @@ export default function Profile() {
<span className="font-medium text-dark-100">{user.email}</span>
{user.email_verified ? (
<span className="badge-success">{t('profile.verified')}</span>
) : (
) : isEmailVerificationEnabled ? (
<span className="badge-warning">{t('profile.notVerified')}</span>
)}
) : null}
</div>
</div>
{!user.email_verified && (
{!user.email_verified && isEmailVerificationEnabled && (
<div className="rounded-linear border border-warning-500/30 bg-warning-500/10 p-4">
<p className="mb-4 text-sm text-warning-400">
{t('profile.verificationRequired')}