-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Copy and refactor nav #107
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
apps/storefront/src/app/[locale]/(main)/_components/navigation.tsx
Outdated
Show resolved
Hide resolved
apps/storefront/src/app/[locale]/(main)/_components/navigation.tsx
Outdated
Show resolved
Hide resolved
apps/storefront/src/app/[locale]/(main)/_components/navigation.tsx
Outdated
Show resolved
Hide resolved
apps/storefront/src/app/[locale]/(main)/_components/navigation.tsx
Outdated
Show resolved
Hide resolved
child.collection_slug ? { slug: child.collection_slug } : null, | ||
child.page_slug ? { slug: child.page_slug } : null, | ||
) || | ||
"#", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why #?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to be string to use it as a href in Link, but url from cms can be null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but all of the elements in the menu should be links so if someone won't set links via CMS the storefront should be notified so either make URLs as required fields in types or make a condition item.url && <Link
. Setting the hash as the link value when it wasn't set in CMS doesn't seem right to me. The empty hash will navigate to the top of the page and be weirdly visible in URL
I want to merge this change because it copies nav from fashion branch and refactores it.
Pull Request Checklist