diff --git a/src/app/commands.ts b/src/app/commands.ts index 4bfdc258..a93729fd 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -151,7 +151,7 @@ export const addSpaceMembership = async (url: string) => { export const removeSpaceMembership = async (url: string) => { const list = get(userMembership) || makeList({kind: MEMBERSHIPS}) - const pred = (t: string[]) => equals(["r", url], t) || t[2] !== url + const pred = (t: string[]) => t[t[0] === "r" ? 1 : 2] === url const event = await removeFromListByPredicate(list, pred).reconcile(nip44EncryptToSelf) return publishThunk({event, relays: ctx.app.router.WriteRelays().getUrls()}).result diff --git a/src/app/components/PrimaryNav.svelte b/src/app/components/PrimaryNav.svelte index 1bfd5ad5..b8de5e11 100644 --- a/src/app/components/PrimaryNav.svelte +++ b/src/app/components/PrimaryNav.svelte @@ -2,6 +2,7 @@ import {displayRelayUrl} from "@welshman/util" import {userProfile} from "@welshman/app" import Avatar from "@lib/components/Avatar.svelte" + import Divider from "@lib/components/Divider.svelte" import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte" import SpaceAdd from "@app/components/SpaceAdd.svelte" import SpaceAvatar from "@app/components/SpaceAvatar.svelte" @@ -21,6 +22,10 @@