mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-06 20:46:29 +00:00
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { type Metadata } from 'next';
|
|
import { Suspense, lazy } from 'react';
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
|
import LazyLoading from '@/components/loader/LazyLoading';
|
|
import fetchData from '@/lib/fetchData';
|
|
|
|
const ComponentPage = lazy(() => import('./component'));
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Admin | Day Off",
|
|
}
|
|
|
|
|
|
export default async function DeviceTypePage() {
|
|
const data = await fetchData('/dayoff')
|
|
|
|
return (
|
|
<>
|
|
<div className="flex flex-col">
|
|
<Card>
|
|
<CardHeader className='flex flex-row items-center justify-between space-y-2 sm:space-y-0'>
|
|
<div>
|
|
<CardTitle>Day Off Calendar</CardTitle>
|
|
<CardDescription>Here's a list of day off of H.A.T.s Calendar!</CardDescription>
|
|
</div>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<Suspense fallback={<LazyLoading />}>
|
|
<ComponentPage data={data.day_off} />
|
|
</Suspense>
|
|
</CardContent>
|
|
</Card>
|
|
</div>
|
|
</>
|
|
);
|
|
} |