mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +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,
|
||||
})
|
||||
|
||||
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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user