Skip to content

Commit 5fb243d

Browse files
m7yueijjk
andauthored
examples(with-turbopack): Fix styling page default active stylingNav (vercel#42739)
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> Closes: vercel#42768 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md) Co-authored-by: JJ Kasper <[email protected]>
1 parent 48290c6 commit 5fb243d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/with-turbopack/app/styling/StylingNav.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ const items = [
3131
];
3232

3333
const StylingNav = () => {
34-
const [selectedLayoutSegments] = useSelectedLayoutSegments();
34+
const [selectedLayoutSegments = ''] = useSelectedLayoutSegments();
3535

3636
return (
3737
<div className="flex items-center space-x-4">
3838
{items.map((item) => (
3939
<TabNavItem
4040
key={item.slug}
41-
href={`/styling/${item.slug}`}
41+
href={`/styling${item.slug ? `/${item.slug}` : ''}`}
4242
isActive={item.slug === selectedLayoutSegments}
4343
>
4444
{item.name}

0 commit comments

Comments
 (0)