Skip to content
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

add simple header and navigation #5

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Conversation

skumpulainen
Copy link
Collaborator

  • add simple header and navigation
  • decided to use css modules

Copy link
Collaborator

@Kitsupitsu Kitsupitsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Added a few comments, but those are just stylistic changes :)

return (
<NavigationMenu.Item key={i}>
<NavigationMenu.Link
data-active={location.pathname === navigationRoute.href ? true : false}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be simplified to location.pathname === navigationRoute.href

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, totally!

<NavigationMenu.List className={styles["navigation-menu-list"]}>
{navigationRoutes.map((navigationRoute, i) => {
return (
<NavigationMenu.Item key={i}>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible and reasonable to use navigationRoute.name as key instead of index?

@skumpulainen skumpulainen merged commit 5c9b998 into main Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants