Skip to content

Commit

Permalink
feat: add layout for thoughts page
Browse files Browse the repository at this point in the history
  • Loading branch information
moonlitgrace committed Aug 21, 2024
1 parent 2613efa commit 1c665a1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/thoughts/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default function Page({ params }: { params: { slug: string } }) {
return (
<h1>{params.slug}</h1>
)
}
7 changes: 7 additions & 0 deletions app/thoughts/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

export default function ThoughtsLayout({ children }: Readonly<{ children: React.ReactNode }>) {
return <main className="w-full flex flex-col gap-10 mt-10">
{children}
</main>
}
4 changes: 2 additions & 2 deletions app/thoughts/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const metadata: Metadata = {

export default function Thoughts() {
return (
<main className="w-full flex flex-col gap-10 mt-10">
<>
<h2 className="text-3xl font-bold">Thoughts.</h2>
<div className="flex flex-col gap-5">
{MOCK_DATA.map((item) => (
Expand All @@ -43,6 +43,6 @@ export default function Thoughts() {
</div>
))}
</div>
</main>
</>
)
}

0 comments on commit 1c665a1

Please sign in to comment.