From 30f0cb070247c82baac1b44cc9d8ff6d9da62ac6 Mon Sep 17 00:00:00 2001 From: chattie Date: Mon, 24 Aug 2026 21:50:52 +0200 Subject: [PATCH] fix(frontend): wrap useSearchParams in Suspense for Next.js 16 compat --- project/apps/admin/next-env.d.ts | 4 ++-- project/apps/pos/next-env.d.ts | 4 ++-- project/frontend/src/app/auth/confirm/page.tsx | 18 ++++++++++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/project/apps/admin/next-env.d.ts b/project/apps/admin/next-env.d.ts index a419cbe..ce4e94a 100644 --- a/project/apps/admin/next-env.d.ts +++ b/project/apps/admin/next-env.d.ts @@ -1,7 +1,7 @@ /// /// -import "./.next/dev/types/routes.d.ts"; -import "./.next/dev/types/root-params.d.ts"; +import "./.next/types/routes.d.ts"; +import "./.next/types/root-params.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/project/apps/pos/next-env.d.ts b/project/apps/pos/next-env.d.ts index a419cbe..ce4e94a 100644 --- a/project/apps/pos/next-env.d.ts +++ b/project/apps/pos/next-env.d.ts @@ -1,7 +1,7 @@ /// /// -import "./.next/dev/types/routes.d.ts"; -import "./.next/dev/types/root-params.d.ts"; +import "./.next/types/routes.d.ts"; +import "./.next/types/root-params.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/project/frontend/src/app/auth/confirm/page.tsx b/project/frontend/src/app/auth/confirm/page.tsx index a4a097a..458af07 100644 --- a/project/frontend/src/app/auth/confirm/page.tsx +++ b/project/frontend/src/app/auth/confirm/page.tsx @@ -1,9 +1,9 @@ 'use client'; -import { useEffect, useState } from 'react'; +import { Suspense, useEffect, useState } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import Link from 'next/link'; -export default function ConfirmPage() { +function ConfirmContent() { const router = useRouter(); const params = useSearchParams(); const token = params.get('token'); @@ -72,3 +72,17 @@ export default function ConfirmPage() { ); } + +export default function ConfirmPage() { + return ( + +
+

Cargando...

+
+ + }> + +
+ ); +}