From 8b061f74897c46cd51e12c5f4c630ee6468e89ec Mon Sep 17 00:00:00 2001 From: nthanhtoan61 Date: Tue, 19 May 2026 13:41:17 +0700 Subject: [PATCH] fix run build --- app/(site)/registration/cancel/page.tsx | 24 ++- app/(site)/registration/success/page.tsx | 181 +++++++++++++---------- 2 files changed, 119 insertions(+), 86 deletions(-) diff --git a/app/(site)/registration/cancel/page.tsx b/app/(site)/registration/cancel/page.tsx index 720f3b4..5633694 100644 --- a/app/(site)/registration/cancel/page.tsx +++ b/app/(site)/registration/cancel/page.tsx @@ -1,10 +1,10 @@ "use client"; -import { useEffect, useState } from "react"; +import { Suspense, useEffect, useState } from "react"; import { useSearchParams } from "next/navigation"; import Link from "next/link"; -export default function RegistrationCancelPage() { +function CancelContent() { const searchParams = useSearchParams(); const token = searchParams.get("token"); const [cancelled, setCancelled] = useState(false); @@ -21,6 +21,18 @@ export default function RegistrationCancelPage() { } }, [token]); + return ( + <> + {!cancelled && ( +

+ Đang cập nhật trạng thái... +

+ )} + + ); +} + +export default function RegistrationCancelPage() { return (
@@ -59,11 +71,9 @@ export default function RegistrationCancelPage() {
- {!cancelled && ( -

- Đang cập nhật trạng thái... -

- )} + + +
diff --git a/app/(site)/registration/success/page.tsx b/app/(site)/registration/success/page.tsx index a02ac6b..86c64f5 100644 --- a/app/(site)/registration/success/page.tsx +++ b/app/(site)/registration/success/page.tsx @@ -1,10 +1,10 @@ "use client"; -import { useEffect, useState } from "react"; +import { Suspense, useEffect, useState } from "react"; import { useSearchParams } from "next/navigation"; import Link from "next/link"; -export default function RegistrationSuccessPage() { +function SuccessContent() { const searchParams = useSearchParams(); const token = searchParams.get("token"); const payerId = searchParams.get("PayerID"); @@ -43,99 +43,122 @@ export default function RegistrationSuccessPage() { }, [token, payerId]); return ( -
-
- {state === "loading" && ( -
-
- - progress_activity - -
-

- Đang xử lý thanh toán của bạn... -

+ <> + {state === "loading" && ( +
+
+ + progress_activity +
- )} +

+ Đang xử lý thanh toán của bạn... +

+
+ )} - {state === "success" && ( -
-
+ {state === "success" && ( +
+
-
- - check_circle - -
+
+ + check_circle + +
-

- Thanh toán thành công! -

+

+ Thanh toán thành công! +

-

- Cảm ơn bạn đã đăng ký tham dự IPv6 Summit. -

+

+ Cảm ơn bạn đã đăng ký tham dự IPv6 Summit. +

-
- {registrationId && ( -
- Mã đăng ký - - #{registrationId} - -
- )} +
+ {registrationId && (
- Số tiền đã thanh toán - $120 USD + Mã đăng ký + + #{registrationId} +
-
- -

- Chúng tôi sẽ liên hệ với bạn qua email để xác nhận. -

- -
- - home - Về trang chủ - + )} +
+ Số tiền đã thanh toán + $120 USD
- )} - {state === "error" && ( -
-
- -
- - error - -
- -

- Có lỗi xảy ra -

- - {errorMessage && ( -

- {errorMessage} -

- )} +

+ Chúng tôi sẽ liên hệ với bạn qua email để xác nhận. +

+
- refresh - Thử lại đăng ký + home + Về trang chủ
- )} +
+ )} + + {state === "error" && ( +
+
+ +
+ + error + +
+ +

+ Có lỗi xảy ra +

+ + {errorMessage && ( +

+ {errorMessage} +

+ )} + + + refresh + Thử lại đăng ký + +
+ )} + + ); +} + +export default function RegistrationSuccessPage() { + return ( +
+
+ +
+ + progress_activity + +
+

+ Đang tải... +

+
+ } + > + +
);