Skip to content

Commit

Permalink
Class 16 metabase
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgeMadson committed Jan 25, 2024
1 parent 88b58a3 commit 35ae767
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/dashboard/(overview)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import { lusitana } from '@/app/ui/fonts';
import { fetchCardData } from '../../lib/data';
import { Suspense } from 'react';
import { CardsSkeleton, LatestInvoicesSkeleton, RevenueChartSkeleton } from '@/app/ui/skeletons';
import { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Dashboard',
};

export default async function Page() {
const {
Expand Down
4 changes: 4 additions & 0 deletions app/dashboard/invoices/[id]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +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 invoice',
};
export default async function Page({ params }: { params: { id: string } }) {
const id = params.id;
const [invoice, customers] = await Promise.all([
Expand Down
6 changes: 5 additions & 1 deletion app/dashboard/invoices/create/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
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 Invoice',
};
export default async function Page() {
const customers = await fetchCustomers();

Expand Down
5 changes: 5 additions & 0 deletions app/dashboard/invoices/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ import { lusitana } from '@/app/ui/fonts';
import { InvoicesTableSkeleton } from '@/app/ui/skeletons';
import { Suspense } from 'react';
import { fetchInvoicesPages } from '@/app/lib/data';
import { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Invoices',
};

export default async function Page({
searchParams,
Expand Down
10 changes: 10 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import '@/app/ui/global.css';
import { inter } from '@/app/ui/fonts';
import { Metadata } from 'next';

export const metadata: Metadata = {
title: {
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'),
};

export default function RootLayout({
children,
}: {
Expand Down
7 changes: 6 additions & 1 deletion app/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import AcmeLogo from '@/app/ui/acme-logo';
import LoginForm from '@/app/ui/login-form';

import { Metadata } from 'next';

export const metadata: Metadata = {
title: 'Login',
};

export default function LoginPage() {
return (
<main className="flex items-center justify-center md:h-screen">
Expand Down

0 comments on commit 35ae767

Please sign in to comment.