diff --git a/README.md b/README.md index 5ceb747..35d7e53 100644 --- a/README.md +++ b/README.md @@ -259,4 +259,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file --- -Built with ❤️ for freelancers and small businesses who deserve better invoicing tools. +Built for freelancers and small businesses who deserve better invoicing tools. diff --git a/src/app/dashboard/clients/[id]/edit/page.tsx b/src/app/dashboard/clients/[id]/edit/page.tsx index 6583f65..fa1818f 100644 --- a/src/app/dashboard/clients/[id]/edit/page.tsx +++ b/src/app/dashboard/clients/[id]/edit/page.tsx @@ -1,25 +1,12 @@ -import Link from "next/link"; -import { HydrateClient } from "~/trpc/server"; +"use client"; + +import { useParams } from "next/navigation"; import { ClientForm } from "~/components/forms/client-form"; -import { PageHeader } from "~/components/layout/page-header"; -interface EditClientPageProps { - params: Promise<{ id: string }>; -} - -export default async function EditClientPage({ params }: EditClientPageProps) { - const { id } = await params; - - return ( -
{client.email}
-Phone
-{client.phone}
-Address
-{client.addressLine1}
} - {client.addressLine2 &&{client.addressLine2}
} ++ Email +
+{client.email}
++ Phone +
+{client.phone}
+{client.addressLine1}
+ )} + {client.addressLine2 && ( +{client.addressLine2}
+ )} {(client.city ?? client.state ?? client.postalCode) && ( -+
{[client.city, client.state, client.postalCode] .filter(Boolean) .join(", ")}
)} - {client.country &&{client.country}
} + {client.country && ( +{client.country}
+ )}Client Since
-+
+ Client Since +
+{formatDate(client.createdAt)}
+ {formatCurrency(totalInvoiced)} +
+Total Invoiced
++ {paidInvoices} +
+Paid
++ {pendingInvoices} +
+Pending
+- {formatCurrency(totalInvoiced)} -
-Total Invoiced
-{paidInvoices}
-Paid
-- {pendingInvoices} -
-Pending
-+ {invoice.invoiceNumber} +
++ {formatDate(invoice.issueDate)} +
++ {formatCurrency(invoice.totalAmount)} +
+- {invoice.invoiceNumber} -
-- {formatDate(invoice.issueDate)} -
-- {formatCurrency(invoice.totalAmount)} -
-