- {/* NOTE: Uncomment this code in Chapter 7 */}
+ {/* NOTE: comment in this code when you get to this point in the course */}
{/*
{latestInvoices.map((invoice, i) => {
diff --git a/app/ui/dashboard/latest-invoices.tsx:Zone.Identifier b/app/ui/dashboard/latest-invoices.tsx:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/app/ui/dashboard/nav-links.tsx b/app/ui/dashboard/nav-links.tsx
index 72fa4626..f048b4d4 100644
--- a/app/ui/dashboard/nav-links.tsx
+++ b/app/ui/dashboard/nav-links.tsx
@@ -1,8 +1,13 @@
+'use client';
+
import {
UserGroupIcon,
HomeIcon,
DocumentDuplicateIcon,
} from '@heroicons/react/24/outline';
+import Link from 'next/link';
+import { usePathname } from 'next/navigation';
+import clsx from 'clsx';
// Map of links to display in the side navigation.
// Depending on the size of the application, this would be stored in a database.
@@ -17,19 +22,25 @@ const links = [
];
export default function NavLinks() {
- return (
+ const pathname = usePathname();
+return (
<>
{links.map((link) => {
const LinkIcon = link.icon;
return (
-
{link.name}
-
+
);
})}
>
diff --git a/app/ui/dashboard/nav-links.tsx:Zone.Identifier b/app/ui/dashboard/nav-links.tsx:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/app/ui/dashboard/revenue-chart.tsx b/app/ui/dashboard/revenue-chart.tsx
index f19e698d..7ccc409a 100644
--- a/app/ui/dashboard/revenue-chart.tsx
+++ b/app/ui/dashboard/revenue-chart.tsx
@@ -15,7 +15,7 @@ export default async function RevenueChart({
revenue: Revenue[];
}) {
const chartHeight = 350;
- // NOTE: Uncomment this code in Chapter 7
+ // NOTE: comment in this code when you get to this point in the course
// const { yAxisLabels, topLabel } = generateYAxis(revenue);
@@ -28,7 +28,7 @@ export default async function RevenueChart({
Recent Revenue
- {/* NOTE: Uncomment this code in Chapter 7 */}
+ {/* NOTE: comment in this code when you get to this point in the course */}
{/*
diff --git a/app/ui/dashboard/revenue-chart.tsx:Zone.Identifier b/app/ui/dashboard/revenue-chart.tsx:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/app/ui/dashboard/sidenav.tsx b/app/ui/dashboard/sidenav.tsx
index 3d55b46e..006d1ac4 100644
--- a/app/ui/dashboard/sidenav.tsx
+++ b/app/ui/dashboard/sidenav.tsx
@@ -18,7 +18,7 @@ export default function SideNav() {
+ s