All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 41s
24 lines
469 B
TypeScript
24 lines
469 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;
|