From 2a283aebef94ced845afe3d8d49b857caa5af243 Mon Sep 17 00:00:00 2001 From: painterpuppets Date: Tue, 9 Jan 2024 22:16:43 +0800 Subject: [PATCH] feat: add loading skeleton --- packages/status/package.json | 1 + .../status/src/components/Layout/index.tsx | 21 +++++ .../src/components/StatusResource/index.tsx | 5 +- packages/status/src/pages/events.tsx | 89 +++++++++++++++++++ packages/status/src/pages/index.tsx | 27 +++--- packages/status/src/pages/stat.tsx | 34 +++---- .../status/src/server/api/routers/uptime.ts | 46 +++++++++- yarn.lock | 8 ++ 8 files changed, 190 insertions(+), 41 deletions(-) create mode 100644 packages/status/src/components/Layout/index.tsx create mode 100644 packages/status/src/pages/events.tsx diff --git a/packages/status/package.json b/packages/status/package.json index 0fef48f..b15c693 100644 --- a/packages/status/package.json +++ b/packages/status/package.json @@ -21,6 +21,7 @@ "@trpc/server": "^10.28.2", "@uidotdev/usehooks": "^2.4.1", "classnames": "2.3.2", + "dayjs": "^1.11.10", "i18next": "^22.5.0", "next": "13.5.6", "next-i18next": "^13.2.2", diff --git a/packages/status/src/components/Layout/index.tsx b/packages/status/src/components/Layout/index.tsx new file mode 100644 index 0000000..991a9c3 --- /dev/null +++ b/packages/status/src/components/Layout/index.tsx @@ -0,0 +1,21 @@ +import { Footer, Header } from '@magickbase-website/shared' +import { api } from '@/utils/api' +import { PropsWithChildren } from 'react' + +export const Layout: React.FC = ({ children }) => { + const aggregateStateQuery = api.uptime.aggregateState.useQuery() + + return ( + <> +
+ {children} +