1
0
Fork 0
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:
Fedor Katurov 2022-08-05 20:45:20 +07:00
parent e3c5b281e6
commit bb2e814cf2

View file

@ -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>(