diff --git a/web-next/app/[locale]/account/page.tsx b/web-next/app/[locale]/account/page.tsx index b76326d..d3454b6 100644 --- a/web-next/app/[locale]/account/page.tsx +++ b/web-next/app/[locale]/account/page.tsx @@ -1,5 +1,5 @@ import { getTranslations, setRequestLocale } from 'next-intl/server' -import { redirect } from '@/i18n/navigation' +import { redirect, Link } from '@/i18n/navigation' import { getSession } from '@/lib/session' import { getAccountDashboard, getAccountRank } from '@/lib/account' import { isAdmin } from '@/lib/admin' @@ -8,6 +8,15 @@ import { AccountTools } from '@/components/AccountTools' export const dynamic = 'force-dynamic' +// Enmascara el correo: muestra los primeros caracteres del usuario y el dominio. +function maskEmail(e: string): string { + if (!e) return '' + const [local, domain] = e.split('@') + if (!domain) return e + const visible = local.slice(0, Math.min(6, Math.max(1, local.length - 2))) + return `${visible}***@${domain}` +} + const ICONS = '/nw-themes/nw-ryu/nw-images/nw-icons' export default async function AccountPage({ params }: { params: Promise<{ locale: string }> }) { @@ -33,45 +42,27 @@ export default async function AccountPage({ params }: { params: Promise<{ locale