forked from coracle/flotilla
Factor primary nav spaces into its own component, fix non-nip29 default page
This commit is contained in:
@@ -8,6 +8,7 @@ export const setupHistory = () =>
|
||||
if ($page.params.relay) {
|
||||
lastPageBySpaceUrl.set($page.params.relay, $page.url.pathname)
|
||||
}
|
||||
|
||||
if ($page.params.chat) {
|
||||
lastChatUrl = $page.url.pathname
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export const makeSpacePath = (url: string, ...extra: (string | undefined)[]) =>
|
||||
export const goToSpace = async (url: string) => {
|
||||
const prevPath = lastPageBySpaceUrl.get(encodeRelay(url))
|
||||
|
||||
if (prevPath) {
|
||||
if (prevPath && prevPath !== makeSpacePath(url)) {
|
||||
goto(prevPath)
|
||||
} else if (hasNip29(await loadRelay(url))) {
|
||||
goto(makeSpacePath(url, "recent"))
|
||||
|
||||
Reference in New Issue
Block a user