Skip to content

Commit

Permalink
Merge pull request #3 from spencer-rafada/spencer/add-routes
Browse files Browse the repository at this point in the history
Added Routes and Metadata for each page
  • Loading branch information
spencer-rafada authored Dec 28, 2023
2 parents 9cca28b + 6e03fe0 commit 5e3bc57
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 2 deletions.
15 changes: 15 additions & 0 deletions src/app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Metadata } from 'next'
import React from 'react'

export const metadata: Metadata = {
title: 'About',
description: 'About Page',
}

export default function About() {
return (
<>
<div>About Page</div>
</>
)
}
11 changes: 11 additions & 0 deletions src/app/contact/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Metadata } from 'next'
import React from 'react'

export const metadata: Metadata = {
title: 'Contact',
description: 'Contact Page',
}

export default function Contact() {
return <div>Contact Page</div>
}
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import ThemeProvider from './_providers/ThemeProvider'
const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
title: 'Ray Foundation',
description: 'Transforming Lives Through Service',
}

export default function RootLayout({
Expand Down
11 changes: 11 additions & 0 deletions src/app/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Metadata } from 'next'
import React from 'react'

export const metadata: Metadata = {
title: 'Project',
description: 'Project Page',
}

export default function Project() {
return <div>Project Page</div>
}
24 changes: 24 additions & 0 deletions src/app/team/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Metadata, ResolvingMetadata } from 'next'
import React from 'react'

type MetadataProps = {
params: { id: string }
}

export async function generateMetadata(
{ params }: MetadataProps,
parent: ResolvingMetadata
): Promise<Metadata> {
const id = params.id

// Fetch Team Member Information Here

return {
title: `Team Member ${id}`,
description: `Team Member ${id}`,
}
}

export default function TeamMember({ params }: { params: { id: string } }) {
return <div>TeamMember {params.id}</div>
}
11 changes: 11 additions & 0 deletions src/app/team/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Metadata } from 'next'
import React from 'react'

export const metadata: Metadata = {
title: 'Team',
description: 'Team Page',
}

export default function Team() {
return <div>Team Page</div>
}

0 comments on commit 5e3bc57

Please sign in to comment.