Update route info on click

I have a button which opens a slider (sheet component) from the right side. I also would like to update the route once clicked on it, since I am not opening a page.

Currently I am doing this on button click
  const handleOverviewRoute = () => {
    router.replace("/dashboard/overview")
  }


But that does not quiet work, it does not open the sheet anymore, seems like it tries to go to the page.
How can I make this work?

Also what do you think of this behavior is it fine to update the route even if I am not changing the path?
Was this page helpful?