From ab4d446e34013eae87b48146794b80cec0a3979c Mon Sep 17 00:00:00 2001 From: Stephanie Dietz <49788645+StephDietz@users.noreply.github.com> Date: Tue, 5 Sep 2023 08:23:34 -0500 Subject: [PATCH] Implement new table component (#136) * add table compoennt * format * format * change table type to be a card * update table header and link * update layout and table width * edit table * fix layout overflow issue with table * fix mege issue with dummy data * make only content portion scrollable * increase w of side nav in mobile * remove duplicate date key --------- Co-authored-by: Delba de Oliveira --- dashboard/15-final/app/dashboard/layout.tsx | 8 +++++--- dashboard/15-final/app/ui/dashboard-sidenav.tsx | 2 +- dashboard/15-final/app/ui/table.tsx | 13 +++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dashboard/15-final/app/dashboard/layout.tsx b/dashboard/15-final/app/dashboard/layout.tsx index 0eb56e6..d4fd013 100644 --- a/dashboard/15-final/app/dashboard/layout.tsx +++ b/dashboard/15-final/app/dashboard/layout.tsx @@ -3,9 +3,11 @@ import SideNav from "../ui/dashboard-sidenav"; export default function Layout({ children }: { children: React.ReactNode }) { return ( -
- -
+
+
+ +
+
{children}
diff --git a/dashboard/15-final/app/ui/dashboard-sidenav.tsx b/dashboard/15-final/app/ui/dashboard-sidenav.tsx index 2b5838a..8da66e0 100644 --- a/dashboard/15-final/app/ui/dashboard-sidenav.tsx +++ b/dashboard/15-final/app/ui/dashboard-sidenav.tsx @@ -22,7 +22,7 @@ export default function SideNav() { ]; return ( -
+
customer.id === customerId); return customerName ? customerName.name : null; } + return (

Invoices

Add Invoice
-
+
@@ -50,11 +51,11 @@ export default function Example() { {invoice.id} - + @@ -68,3 +69,7 @@ export default function Example() { ) } + + + +
{getNameById(invoice.customerId)}{(invoice.amount / 100).toLocaleString("en-US", {style: "currency", currency: "USD"})}{invoice.amount.toLocaleString("en-US", {style: "currency", currency: "USD"})} {invoice.status} {invoice.date} - + View, {invoice.id}