Add space home page

This commit is contained in:
Jon Staab
2024-10-31 12:24:40 -07:00
parent df947e9fcf
commit 74f9531c5f
34 changed files with 401 additions and 155 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
import type {Page} from "@sveltejs/kit"
import {userMembership, makeChatId, decodeRelay, encodeRelay, getMembershipUrls} from "@app/state"
export const makeSpacePath = (url: string, extra = "") => {
export const makeSpacePath = (url: string, ...extra: string[]) => {
let path = `/spaces/${encodeRelay(url)}`
if (extra) {
path += "/" + encodeURIComponent(extra)
if (extra.length > 0) {
path += "/" + extra.map(s => encodeURIComponent(s)).join("/")
}
return path