flotilla/src/app/util/history.ts

11 lines
267 B
TypeScript
Raw Normal View History

2025-10-06 18:23:19 +00:00
import {page} from "$app/stores"
export const lastPageBySpaceUrl = new Map<string, string>()
2025-10-21 15:27:30 +00:00
export const setupHistory = () =>
2025-10-06 18:23:19 +00:00
page.subscribe($page => {
if ($page.params.relay) {
lastPageBySpaceUrl.set($page.params.relay, $page.url.pathname)
}
})