mirror of
https://github.com/michivonah/nextjs.git
synced 2025-12-22 22:16:28 +01:00
setup db connection + implement data fetching on dashboard + add skeleton + docs
This commit is contained in:
parent
aea677e6f7
commit
00c39d3416
11 changed files with 259 additions and 67 deletions
30
dashboard-app-course/app/dashboard/(overview)/page.tsx
Normal file
30
dashboard-app-course/app/dashboard/(overview)/page.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { Card } from '@/app/ui/dashboard/cards'
|
||||
import RevenueChart from '../../ui/dashboard/revenue-chart';
|
||||
import LatestInvoices from '../../ui/dashboard/latest-invoices';
|
||||
import { lusitana } from '../../ui/fonts';
|
||||
import { Suspense } from 'react';
|
||||
import { RevenueChartSkeleton, LatestInvoicesSkeleton, CardsSkeleton, CardSkeleton} from '@/app/ui/skeletons';
|
||||
import CardWrapper from '@/app/ui/dashboard/cards';
|
||||
|
||||
export default async function Page(){
|
||||
return (
|
||||
<main>
|
||||
<h1 className={`${lusitana.className} mb-4 text-xl md:text-2x1`}>
|
||||
Dashboard
|
||||
</h1>
|
||||
<div className='grid gap-6 sm: grid-cols-2 lg:grid-cols-4'>
|
||||
<Suspense fallback={<CardSkeleton />}>
|
||||
<CardWrapper />
|
||||
</Suspense>
|
||||
</div>
|
||||
<div className='mt-6 grid grid-cols-1 gap-6 md:grid-cols-4 lg:grid-cols-8'>
|
||||
<Suspense fallback={<RevenueChartSkeleton />}>
|
||||
<RevenueChart />
|
||||
</Suspense>
|
||||
<Suspense fallback={<LatestInvoicesSkeleton />}>
|
||||
<LatestInvoices />
|
||||
</Suspense>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue