leilo5
This commit is contained in:
@@ -1,39 +1,33 @@
|
||||
import { Card } from '@/app/ui/dashboard/cards';
|
||||
import CardWrapper, { Card } from '@/app/ui/dashboard/cards';
|
||||
import RevenueChart from '@/app/ui/dashboard/revenue-chart';
|
||||
import LatestInvoices from '@/app/ui/dashboard/latest-invoices';
|
||||
import { lusitana } from '@/app/ui/fonts';
|
||||
import { fetchCardData } from '@/app/lib/data';
|
||||
import { Suspense } from 'react';
|
||||
import CardWrapper from '@/app/ui/dashboard/cards';
|
||||
import {
|
||||
RevenueChartSkeleton,
|
||||
LatestInvoicesSkeleton,
|
||||
CardsSkeleton,
|
||||
} from '@/app/ui/skeletons';
|
||||
import { CardSkeleton, LatestInvoicesSkeleton, RevenueChartSkeleton } from '@/app/ui/skeletons';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Dashboard',
|
||||
};
|
||||
export default async function Page() {
|
||||
const {
|
||||
numberOfInvoices,
|
||||
numberOfCustomers,
|
||||
totalPaidInvoices,
|
||||
totalPendingInvoices,
|
||||
} = await fetchCardData();
|
||||
|
||||
|
||||
return (
|
||||
<main>
|
||||
<h1 className={`${lusitana.className} mb-4 text-xl md:text-2xl`}>
|
||||
Dashboard
|
||||
</h1>
|
||||
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-4">
|
||||
<Suspense fallback={<CardsSkeleton />}>
|
||||
<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 />}>
|
||||
|
||||
<Suspense fallback={<LatestInvoicesSkeleton />}>
|
||||
<LatestInvoices />
|
||||
</Suspense>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
export default function Page() {
|
||||
return <p>Customers Page</p>;
|
||||
}
|
||||
|
||||
}
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Customers',
|
||||
};
|
||||
@@ -2,6 +2,11 @@ import Form from '@/app/ui/invoices/edit-form';
|
||||
import Breadcrumbs from '@/app/ui/invoices/breadcrumbs';
|
||||
import { fetchInvoiceById, fetchCustomers } from '@/app/lib/data';
|
||||
import { notFound } from 'next/navigation';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Edit invoices',
|
||||
};
|
||||
|
||||
export default async function Page(props: { params: Promise<{ id: string }> }) {
|
||||
const params = await props.params;
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import Form from '@/app/ui/invoices/create-form';
|
||||
import Breadcrumbs from '@/app/ui/invoices/breadcrumbs';
|
||||
import { fetchCustomers } from '@/app/lib/data';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Create invoices',
|
||||
};
|
||||
|
||||
export default async function Page() {
|
||||
const customers = await fetchCustomers();
|
||||
|
||||
|
||||
@@ -6,6 +6,11 @@ import { lusitana } from '@/app/ui/fonts';
|
||||
import { Suspense } from 'react';
|
||||
import { InvoicesTableSkeleton } from '@/app/ui/skeletons';
|
||||
import { fetchInvoicesPages } from '@/app/lib/data';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Invoices',
|
||||
};
|
||||
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
|
||||
Reference in New Issue
Block a user