From e83caa1cfb233b7ce08ec84b14d19b86f41ea9b0 Mon Sep 17 00:00:00 2001 From: Bennet Gallein Date: Sat, 10 May 2025 11:26:10 +0200 Subject: [PATCH] fix: move index to Layout Component --- pages/index.tsx | 73 ++++++++++++------------------------------------- 1 file changed, 17 insertions(+), 56 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index 7a00c3c..2139a4f 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,14 +1,12 @@ -import Head from 'next/head' - import { Inter } from 'next/font/google' import { MonitorState, MonitorTarget } from '@/types/config' import { KVNamespace } from '@cloudflare/workers-types' -import { maintenances, pageConfig, workerConfig } from '@/uptime.config' +import { maintenances, workerConfig } from '@/uptime.config' import OverallStatus from '@/components/OverallStatus' -import Header from '@/components/Header' import MonitorList from '@/components/MonitorList' -import { Center, Divider, Text } from '@mantine/core' +import { Center, Text } from '@mantine/core' import MonitorDetail from '@/components/MonitorDetail' +import Layout from '@/components/Layout' export const runtime = 'experimental-edge' const inter = Inter({ subsets: ['latin'] }) @@ -42,54 +40,20 @@ export default function Home({ } return ( - <> - - {pageConfig.title} - - - -
-
- - {state == undefined ? ( -
- - Monitor State is not defined now, please check your worker's status and KV - binding! - -
- ) : ( -
- - -
- )} - - - - Open-source monitoring and status page powered by{' '} - - Uptimeflare - {' '} - and{' '} - - Cloudflare - - , made with ❤ by{' '} - - lyc8503 - - . - -
- + + {state == undefined ? ( +
+ + Monitor State is not defined now, please check your worker's status and KV binding! + +
+ ) : ( +
+ + +
+ )} +
) } @@ -106,11 +70,8 @@ export async function getServerSideProps() { return { id: monitor.id, name: monitor.name, - // @ts-ignore tooltip: monitor?.tooltip, - // @ts-ignore statusPageLink: monitor?.statusPageLink, - // @ts-ignore hideLatencyChart: monitor?.hideLatencyChart, } })