From 06642825726504ecd2747e10ec50b12440873d4d Mon Sep 17 00:00:00 2001 From: Vivy Bot Date: Mon, 9 Feb 2026 23:23:05 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=BA=20fix:=20validate=20service=20stat?= =?UTF-8?q?us=20before=20showing=20error=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(safe-mode-page)/status/page.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/(safe-mode-page)/status/page.tsx b/app/(safe-mode-page)/status/page.tsx index 10451bf..c27905e 100644 --- a/app/(safe-mode-page)/status/page.tsx +++ b/app/(safe-mode-page)/status/page.tsx @@ -1,6 +1,18 @@ import StatusIndex from "@/features/status"; +import { backendFetch } from "@/shared/helpers/backendFetch"; +import { redirect } from "next/navigation"; + +const page = async () => { + // Check service status with API call + let isDown = false; + try { + const data = await backendFetch("status"); + console.log(data); + } catch (_) { + isDown = true; + } + if (!isDown) redirect("/"); -const page = () => { return (