F: viewTransition to navigation
This commit is contained in:
parent
ea2ec6aa8a
commit
14276d661c
|
@ -54,7 +54,7 @@ export const NavigationState = ({ children }: React.PropsWithChildren) => {
|
||||||
}
|
}
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
scrollTop();
|
scrollTop();
|
||||||
Promise.resolve(router(path)).catch(console.log);
|
Promise.resolve(router(path, { viewTransition: true })).catch(console.log);
|
||||||
setIsBlocked(false);
|
setIsBlocked(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -65,7 +65,7 @@ export const NavigationState = ({ children }: React.PropsWithChildren) => {
|
||||||
(path: string) => {
|
(path: string) => {
|
||||||
if (validate()) {
|
if (validate()) {
|
||||||
scrollTop();
|
scrollTop();
|
||||||
Promise.resolve(router(path, { replace: true })).catch(console.log);
|
Promise.resolve(router(path, { replace: true, viewTransition: true })).catch(console.log);
|
||||||
setIsBlocked(false);
|
setIsBlocked(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user