diff --git a/web-next/app/[locale]/log-out/route.ts b/web-next/app/[locale]/log-out/route.ts index e92c812..2bdf192 100644 --- a/web-next/app/[locale]/log-out/route.ts +++ b/web-next/app/[locale]/log-out/route.ts @@ -18,5 +18,5 @@ export async function GET(_request: Request, { params }: { params: Promise<{ loc const session = await getSession() session.destroy() - return new NextResponse(null, { status: 303, headers: { Location: `/${loc}` } }) + return new NextResponse(null, { status: 303, headers: { Location: `/${loc}/` } }) } diff --git a/web-next/app/[locale]/login/LoginForm.tsx b/web-next/app/[locale]/login/LoginForm.tsx index 1efc234..0378039 100644 --- a/web-next/app/[locale]/login/LoginForm.tsx +++ b/web-next/app/[locale]/login/LoginForm.tsx @@ -38,7 +38,7 @@ export function LoginForm() { // Navegación completa (no del lado cliente): fuerza que el servidor // re-renderice el layout/cabecera con la sesión nueva. Con router.push // el layout persiste y la cabecera seguía mostrando "Conectar". - window.location.assign(`/${locale}${data.needsSelection ? '/select-account' : '/my-account'}`) + window.location.assign(`/${locale}${data.needsSelection ? '/select-account/' : '/my-account/'}`) return } else { const key = (ERROR_KEYS as readonly string[]).includes(data.error ?? '') ? data.error! : 'genericError' diff --git a/web-next/app/[locale]/select-account/SelectAccountForm.tsx b/web-next/app/[locale]/select-account/SelectAccountForm.tsx index 0eb5ea1..535b5b0 100644 --- a/web-next/app/[locale]/select-account/SelectAccountForm.tsx +++ b/web-next/app/[locale]/select-account/SelectAccountForm.tsx @@ -28,7 +28,7 @@ export function SelectAccountForm({ accounts }: { accounts: GameAccount[] }) { }) const data: { success?: boolean } = await res.json() // Navegación completa: re-renderiza el layout/cabecera con la cuenta ya elegida. - if (data.success) window.location.assign(`/${locale}/my-account`) + if (data.success) window.location.assign(`/${locale}/my-account/`) else { setError(t('error')) setBusy(null) diff --git a/web-next/components/SiteHeader.tsx b/web-next/components/SiteHeader.tsx index d14ee71..b6a7fe6 100644 --- a/web-next/components/SiteHeader.tsx +++ b/web-next/components/SiteHeader.tsx @@ -118,7 +118,7 @@ export function SiteHeader({ MI CUENTA
diff --git a/web-next/next.config.ts b/web-next/next.config.ts index a8b2d2e..72ff0e1 100644 --- a/web-next/next.config.ts +++ b/web-next/next.config.ts @@ -4,7 +4,8 @@ import createNextIntlPlugin from 'next-intl/plugin' const withNextIntl = createNextIntlPlugin('./i18n/request.ts') const nextConfig: NextConfig = { - /* config options here */ + // URLs con barra final (/es/ en vez de /es), como el sitio original. + trailingSlash: true, } export default withNextIntl(nextConfig)