Skip to content

Commit

Permalink
feat(navbar): when clicking on a child in navigation bar we want to r…
Browse files Browse the repository at this point in the history
…eplace the history (#705)

* feat(navbar): when clicking on a child in the navigation bar we want to replace the history

when the link is an anchor link do not add the new URL to the history but replace
the last item in the history

* Update version manually
  • Loading branch information
ehsan-github authored Dec 5, 2024
1 parent 3c97aff commit 3a5fce4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "https://github.com/logicalclocks/quartz",
"name": "@logicalclocks/quartz",
"version": "4.14.0",
"version": "4.15.0",
"description": "Logical Clocks Design System Library",
"author": "logicalclocks",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions src/components/navigation/item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const NavigationItem = (props: NavigationItemProps) => {
}}
onClick={(e) => e.stopPropagation()}
to={href}
replace={href.includes('#')}
>
{component}
</Link>
Expand Down

0 comments on commit 3a5fce4

Please sign in to comment.