From 3f8467a13af67ff2ec6f359e63e85371906e6352 Mon Sep 17 00:00:00 2001 From: Ru Chern Chong Date: Sat, 30 Nov 2024 22:22:19 +0800 Subject: [PATCH] Wrap MaintenanceNotice component with Suspense --- .../components/MaintenanceNotice.tsx | 44 ++++++++++++++++++ app/maintenance/page.tsx | 45 +++---------------- 2 files changed, 49 insertions(+), 40 deletions(-) create mode 100644 app/maintenance/components/MaintenanceNotice.tsx diff --git a/app/maintenance/components/MaintenanceNotice.tsx b/app/maintenance/components/MaintenanceNotice.tsx new file mode 100644 index 0000000..16cf4ab --- /dev/null +++ b/app/maintenance/components/MaintenanceNotice.tsx @@ -0,0 +1,44 @@ +import { AlertTriangle, Clock } from "lucide-react"; +import { Footer } from "@/app/maintenance/components/Footer"; +import { Header } from "@/app/maintenance/components/Header"; + +export const MaintenanceNotice = () => { + return ( +
+
+
+
+
+ +
+

+ System Maintenance +

+
+

+ We are currently performing scheduled maintenance to improve your + experience. Our services will be back online shortly. +

+
+ + Estimated downtime: 2 hours +
+
+
+

+ For urgent inquiries, please contact our support team at: +
+ + support@sgcarstrends.com + +

+
+
+
+
+
+ ); +}; diff --git a/app/maintenance/page.tsx b/app/maintenance/page.tsx index 7ec23fc..ec2a8a0 100644 --- a/app/maintenance/page.tsx +++ b/app/maintenance/page.tsx @@ -1,10 +1,8 @@ "use client"; -import { useEffect } from "react"; +import { Suspense, useEffect } from "react"; import { useRouter, useSearchParams } from "next/navigation"; -import { AlertTriangle, Clock } from "lucide-react"; -import { Footer } from "@/app/maintenance/components/Footer"; -import { Header } from "@/app/maintenance/components/Header"; +import { MaintenanceNotice } from "@/app/maintenance/components/MaintenanceNotice"; const MaintenancePage = () => { const router = useRouter(); @@ -37,42 +35,9 @@ const MaintenancePage = () => { }, [router, searchParams]); return ( -
-
-
-
-
- -
-

- System Maintenance -

-
-

- We are currently performing scheduled maintenance to improve your - experience. Our services will be back online shortly. -

-
- - Estimated downtime: 2 hours -
-
-
-

- For urgent inquiries, please contact our support team at: -
- - support@sgcarstrends.com - -

-
-
-
-
-
+ + + ); };