Files
AnimeTV-Frontend/app/(safe-mode-page)/status/page.tsx
Vivy Bot 0664282572
Some checks failed
Integration Tests / integration-tests (pull_request) Failing after 54s
🦺 fix: validate service status before showing error page
2026-02-09 23:23:05 +07:00

24 lines
473 B
TypeScript

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("/");
return (
<div>
<StatusIndex />
</div>
);
};
export default page;