mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
implemented location.lastPathname
This commit is contained in:
parent
95bae7cb61
commit
9cf49eb9fd
@ -160,6 +160,8 @@ export const PageRender = React.memo((props) => {
|
|||||||
state,
|
state,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.location.lastPathname = app.location.pathname
|
||||||
|
|
||||||
if (state.transitionDelay >= 100) {
|
if (state.transitionDelay >= 100) {
|
||||||
await new Promise((resolve) => {
|
await new Promise((resolve) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -172,6 +174,12 @@ export const PageRender = React.memo((props) => {
|
|||||||
state
|
state
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.backLocation = (state = {}) => {
|
||||||
|
return navigate(app.location.lastPathname, {
|
||||||
|
state
|
||||||
|
})
|
||||||
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
return <Routes>
|
return <Routes>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user