implemented location.lastPathname

This commit is contained in:
SrGooglo 2023-05-29 16:42:59 +00:00
parent 95bae7cb61
commit 9cf49eb9fd

View File

@ -160,6 +160,8 @@ export const PageRender = React.memo((props) => {
state,
})
app.location.lastPathname = app.location.pathname
if (state.transitionDelay >= 100) {
await new Promise((resolve) => {
setTimeout(() => {
@ -172,6 +174,12 @@ export const PageRender = React.memo((props) => {
state
})
}
app.backLocation = (state = {}) => {
return navigate(app.location.lastPathname, {
state
})
}
}, [])
return <Routes>