mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-31 16:08:52 +02:00
fix small issue with routing in drawer
This commit is contained in:
parent
e99d9e40f5
commit
16460137b2
@ -122,7 +122,7 @@ export default function DrawerSubViewProvider({
|
||||
} else if (direction.current !== "down") {
|
||||
log("Updating parent state from Router");
|
||||
direction.current = "up";
|
||||
parentRouter.navigate(".", {
|
||||
parentRouter.navigate(parentRouter.state.location, {
|
||||
preventScrollReset: true,
|
||||
state: { ...parentRouter.state.location.state, subRouterPath: e.location.pathname },
|
||||
});
|
||||
@ -145,7 +145,7 @@ export default function DrawerSubViewProvider({
|
||||
const openDrawer = useCallback(
|
||||
(to: To) => {
|
||||
marker.current = 0;
|
||||
parentRouter.navigate(".", {
|
||||
parentRouter.navigate(parentRouter.state.location, {
|
||||
preventScrollReset: true,
|
||||
state: { ...parentRouter.state.location.state, subRouterPath: to },
|
||||
});
|
||||
@ -160,7 +160,7 @@ export default function DrawerSubViewProvider({
|
||||
parentRouter.navigate(-i);
|
||||
} else {
|
||||
log(`Failed to navigate back, clearing state`);
|
||||
parentRouter.navigate(".", {
|
||||
parentRouter.navigate(parentRouter.state.location, {
|
||||
preventScrollReset: true,
|
||||
state: { ...parentRouter.state.location.state, subRouterPath: undefined },
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user