mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: скрыть плашку верификации email при выключенной верификации
- Добавлен verification_enabled в EmailAuthEnabled тип - Баннер "Подтвердите email" скрыт когда верификация выключена - Бейдж "Не подтверждён" скрыт когда верификация выключена
This commit is contained in:
@@ -21,6 +21,7 @@ export interface FullscreenEnabled {
|
||||
|
||||
export interface EmailAuthEnabled {
|
||||
enabled: boolean;
|
||||
verification_enabled?: boolean;
|
||||
}
|
||||
|
||||
export interface GiftEnabled {
|
||||
|
||||
@@ -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')}
|
||||
|
||||
Reference in New Issue
Block a user