mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46: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 close = useCallback(() => {
|
||||||
const [path] = router.asPath.split("?");
|
const [path] = router.asPath.split("?");
|
||||||
|
|
||||||
void router.replace(path, path, {
|
// void router.replace(path, path, {
|
||||||
shallow: true,
|
// shallow: true,
|
||||||
scroll: false,
|
// scroll: false,
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
router.back();
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
const value = useMemo<ContextValue>(
|
const value = useMemo<ContextValue>(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue