diff --git a/app/dashboard/(overview)/loading.tsx b/app/dashboard/(overview)/loading.tsx
index 01e6c609..1d3b06ec 100644
--- a/app/dashboard/(overview)/loading.tsx
+++ b/app/dashboard/(overview)/loading.tsx
@@ -1,5 +1,5 @@
-import DashboardSkeleton from '@/app/ui/skeletons';
-
+import DashboardSkeleton from "@/app/ui/skeletons";
+
export default function Loading() {
return ;
-}
\ No newline at end of file
+}
diff --git a/app/dashboard/(overview)/page.tsx b/app/dashboard/(overview)/page.tsx
index 26f287bb..13acd308 100644
--- a/app/dashboard/(overview)/page.tsx
+++ b/app/dashboard/(overview)/page.tsx
@@ -1,36 +1,38 @@
-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 { Suspense } from 'react';
-import { CardSkeleton, LatestInvoicesSkeleton, RevenueChartSkeleton } from '@/app/ui/skeletons';
-import { Metadata } from 'next';
-
-export const metadata: Metadata = {
- title: 'Dashboard',
-};
-export default async function Page() {
-
- return (
-
-
- Dashboard
-
-
- }>
-
-
-
-
-
- }>
-
-
-
- }>
-
-
-
-
- );
-}
\ No newline at end of file
+import type { Metadata } from "next";
+import { Suspense } from "react";
+import CardWrapper from "@/app/ui/dashboard/cards";
+import LatestInvoices from "@/app/ui/dashboard/latest-invoices";
+import RevenueChart from "@/app/ui/dashboard/revenue-chart";
+import { lusitana } from "@/app/ui/fonts";
+import {
+ CardSkeleton,
+ LatestInvoicesSkeleton,
+ RevenueChartSkeleton,
+} from "@/app/ui/skeletons";
+
+export const metadata: Metadata = {
+ title: "Dashboard",
+};
+export default async function Page() {
+ return (
+
+
+ Dashboard
+
+
+ }>
+
+
+
+
+ }>
+
+
+
+ }>
+
+
+
+
+ );
+}
diff --git a/app/dashboard/customers/page.tsx b/app/dashboard/customers/page.tsx
index e308725b..60071ea9 100644
--- a/app/dashboard/customers/page.tsx
+++ b/app/dashboard/customers/page.tsx
@@ -1,9 +1,9 @@
-export default function Page() {
- return
Customers Page
;
-
-}
-import { Metadata } from 'next';
-
-export const metadata: Metadata = {
- title: 'Customers',
-};
\ No newline at end of file
+export default function Page() {
+ return Customers Page
;
+}
+
+import type { Metadata } from "next";
+
+export const metadata: Metadata = {
+ title: "Customers",
+};
diff --git a/app/dashboard/invoices/[id]/edit/not-found.tsx b/app/dashboard/invoices/[id]/edit/not-found.tsx
index 13733063..6b246e13 100644
--- a/app/dashboard/invoices/[id]/edit/not-found.tsx
+++ b/app/dashboard/invoices/[id]/edit/not-found.tsx
@@ -1,6 +1,6 @@
-import Link from 'next/link';
-import { FaceFrownIcon } from '@heroicons/react/24/outline';
-
+import { FaceFrownIcon } from "@heroicons/react/24/outline";
+import Link from "next/link";
+
export default function NotFound() {
return (
@@ -15,4 +15,4 @@ export default function NotFound() {
);
-}
\ No newline at end of file
+}
diff --git a/app/dashboard/invoices/[id]/edit/page.tsx b/app/dashboard/invoices/[id]/edit/page.tsx
index c10042ac..122e4265 100644
--- a/app/dashboard/invoices/[id]/edit/page.tsx
+++ b/app/dashboard/invoices/[id]/edit/page.tsx
@@ -1,11 +1,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';
-
+import type { Metadata } from "next";
+import { notFound } from "next/navigation";
+import { fetchCustomers, fetchInvoiceById } from "@/app/lib/data";
+import Breadcrumbs from "@/app/ui/invoices/breadcrumbs";
+import Form from "@/app/ui/invoices/edit-form";
+
export const metadata: Metadata = {
- title: 'Edit invoices',
+ title: "Edit invoices",
};
export default async function Page(props: { params: Promise<{ id: string }> }) {
@@ -16,17 +16,17 @@ export default async function Page(props: { params: Promise<{ id: string }> }) {
fetchCustomers(),
]);
-if (!invoice) {
+ if (!invoice) {
notFound();
-}
+ }
return (
);
-}
\ No newline at end of file
+}
diff --git a/app/dashboard/invoices/create/page.tsx b/app/dashboard/invoices/create/page.tsx
index 03bc879e..160ddff3 100644
--- a/app/dashboard/invoices/create/page.tsx
+++ b/app/dashboard/invoices/create/page.tsx
@@ -1,23 +1,23 @@
-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';
-
+import type { Metadata } from "next";
+import { fetchCustomers } from "@/app/lib/data";
+import Breadcrumbs from "@/app/ui/invoices/breadcrumbs";
+import Form from "@/app/ui/invoices/create-form";
+
export const metadata: Metadata = {
- title: 'Create invoices',
+ title: "Create invoices",
};
export default async function Page() {
const customers = await fetchCustomers();
-
+
return (
);
-}
\ No newline at end of file
+}
diff --git a/app/dashboard/invoices/error.tsx b/app/dashboard/invoices/error.tsx
index e285214f..dcf11027 100644
--- a/app/dashboard/invoices/error.tsx
+++ b/app/dashboard/invoices/error.tsx
@@ -1,7 +1,7 @@
-'use client';
-
-import { useEffect } from 'react';
-
+"use client";
+
+import { useEffect } from "react";
+
export default function Error({
error,
reset,
@@ -13,7 +13,7 @@ export default function Error({
// Optionally log the error to an error reporting service
console.error(error);
}, [error]);
-
+
return (
Something went wrong!
@@ -28,4 +28,4 @@ export default function Error({
);
-}
\ No newline at end of file
+}
diff --git a/app/dashboard/invoices/page.tsx b/app/dashboard/invoices/page.tsx
index 8c363469..5516268a 100644
--- a/app/dashboard/invoices/page.tsx
+++ b/app/dashboard/invoices/page.tsx
@@ -1,43 +1,43 @@
-import Pagination from '@/app/ui/invoices/pagination';
-import Search from '@/app/ui/search';
-import Table from '@/app/ui/invoices/table';
-import { CreateInvoice } from '@/app/ui/invoices/buttons';
-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<{
- query?: string;
- page?: string;
- }>;
-}) {
- const searchParams = await props.searchParams;
- const query = searchParams?.query || '';
- const currentPage = Number(searchParams?.page) || 1;
- const totalPages = await fetchInvoicesPages(query);
-
- return (
-
-
-
Invoices
-
-
-
-
-
-
}>
-
-
-
-
- );
-}
\ No newline at end of file
+import type { Metadata } from "next";
+import { Suspense } from "react";
+import { fetchInvoicesPages } from "@/app/lib/data";
+import { lusitana } from "@/app/ui/fonts";
+import { CreateInvoice } from "@/app/ui/invoices/buttons";
+import Pagination from "@/app/ui/invoices/pagination";
+import Table from "@/app/ui/invoices/table";
+import Search from "@/app/ui/search";
+import { InvoicesTableSkeleton } from "@/app/ui/skeletons";
+
+export const metadata: Metadata = {
+ title: "Invoices",
+};
+
+export default async function Page(props: {
+ searchParams?: Promise<{
+ query?: string;
+ page?: string;
+ }>;
+}) {
+ const searchParams = await props.searchParams;
+ const query = searchParams?.query || "";
+ const currentPage = Number(searchParams?.page) || 1;
+ const totalPages = await fetchInvoicesPages(query);
+
+ return (
+
+
+
Invoices
+
+
+
+
+
+
}>
+
+
+
+
+ );
+}
diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx
index cea40fe9..95c72f66 100644
--- a/app/dashboard/layout.tsx
+++ b/app/dashboard/layout.tsx
@@ -1,12 +1,12 @@
-import SideNav from '@/app/ui/dashboard/sidenav';
-
-export default function Layout({ children }: { children: React.ReactNode }) {
- return (
-
- );
-}
\ No newline at end of file
+import SideNav from "@/app/ui/dashboard/sidenav";
+
+export default function Layout({ children }: { children: React.ReactNode }) {
+ return (
+
+ );
+}
diff --git a/app/layout.tsx b/app/layout.tsx
index 6a96e628..de5a5ad1 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,14 +1,14 @@
-import '@/app/ui/global.css';
-import { inter } from '@/app/ui/fonts';
-import { Metadata } from 'next';
-
+import "@/app/ui/global.css";
+import type { Metadata } from "next";
+import { inter } from "@/app/ui/fonts";
+
export const metadata: Metadata = {
title: {
- template: '%s | Acme Dashboard',
- default: 'Acme Dashboard',
+ template: "%s | Acme Dashboard",
+ default: "Acme Dashboard",
},
- description: 'The official Next.js Learn Dashboard built with App Router.',
- metadataBase: new URL('https://next-learn-dashboard.vercel.sh'),
+ description: "The official Next.js Learn Dashboard built with App Router.",
+ metadataBase: new URL("https://next-learn-dashboard.vercel.sh"),
};
export default function RootLayout({
@@ -21,4 +21,4 @@ export default function RootLayout({
{children}