2025-10-06 18:23:19 +00:00
|
|
|
import {page} from "$app/stores"
|
|
|
|
|
|
|
|
|
|
export const lastPageBySpaceUrl = new Map<string, string>()
|
2026-02-19 18:31:54 +00:00
|
|
|
export let lastChatUrl: string | undefined = undefined
|
2025-10-06 18:23:19 +00:00
|
|
|
|
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)
|
|
|
|
|
}
|
2026-02-19 18:31:54 +00:00
|
|
|
if ($page.params.chat) {
|
|
|
|
|
lastChatUrl = $page.url.pathname
|
|
|
|
|
}
|
2025-10-06 18:23:19 +00:00
|
|
|
})
|