Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nonoakij committed May 23, 2024
1 parent c964fb3 commit 5b7ad4c
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions docs/src/content/docs/guides/09-parallel-routes.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
title: 9. parallel routes
description: 9. parallel routes を利用して、Page ごとに Headder を変更する
sidebar:
badge:
text: TODO
variant: caution
---

## Page ごとに Headder を変更する
Expand Down Expand Up @@ -51,3 +47,23 @@ export default function Header() {
```

この時点で、`http://localhost:3000/inbox` にアクセスすると、Header が `The Joke Mail Service | Inbox` に変更されます。

つぎに、`http://localhost:3000/drafts` にアクセスしてみてください。404エラーが表示されると思います。

これは、`@headers` という形で分割された先にPageが存在しないためです。

draftも同様に追加してみましょう。


```bash
touch apps/workspace/app/(dashboard)/@header/drafts/page.tsx
```

```tsx
export default function Header() {
return "The Joke Mail Service | Drafts";
}
```

これで、`http://localhost:3000/drafts` にアクセスしても、404が表示されなくなったと思います。

0 comments on commit 5b7ad4c

Please sign in to comment.