fix(frontend): wrap useSearchParams in Suspense for Next.js 16 compat
This commit is contained in:
4
project/apps/admin/next-env.d.ts
vendored
4
project/apps/admin/next-env.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
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.
|
||||
|
||||
4
project/apps/pos/next-env.d.ts
vendored
4
project/apps/pos/next-env.d.ts
vendored
@@ -1,7 +1,7 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
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.
|
||||
|
||||
@@ -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() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function ConfirmPage() {
|
||||
return (
|
||||
<Suspense fallback={
|
||||
<div className="max-w-md mx-auto px-4 py-16">
|
||||
<div className="bg-white border border-gray-200 rounded-2xl p-8 shadow-sm text-center">
|
||||
<p className="text-gray-500">Cargando...</p>
|
||||
</div>
|
||||
</div>
|
||||
}>
|
||||
<ConfirmContent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user