mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
using router back for closing sidebar
This commit is contained in:
parent
e3c5b281e6
commit
bb2e814cf2
1 changed files with 6 additions and 4 deletions
|
@ -54,10 +54,12 @@ export const SidebarProvider = <T extends SidebarComponent>({
|
|||
const close = useCallback(() => {
|
||||
const [path] = router.asPath.split("?");
|
||||
|
||||
void router.replace(path, path, {
|
||||
shallow: true,
|
||||
scroll: false,
|
||||
});
|
||||
// void router.replace(path, path, {
|
||||
// shallow: true,
|
||||
// scroll: false,
|
||||
// });
|
||||
|
||||
router.back();
|
||||
}, [router]);
|
||||
|
||||
const value = useMemo<ContextValue>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue