From 1d53de19c8428ae27a0de49ea689b1155d6be754 Mon Sep 17 00:00:00 2001 From: Andrew Lisowski Date: Sat, 5 Dec 2026 13:32:54 -0800 Subject: [PATCH] Feature apps that use ATProto Spaces on the home page and in /apps Detect Spaces (permissioned data) support from a listing's own OAuth client scopes: a `space:` token, or an `include:` permission set with a `resource: "space"` entry. Ignores the authorization server's scopes_supported so a Spaces-capable PDS doesn't flag every app. - Home: "Built for Spaces" section (hidden when empty) - /apps: "Supports Spaces" extra (`?has=spaces`), also in searchListings - Scopes popover: group and describe space scopes and bundle entries Derived in SQL from existing probe data, so no migration. Co-Authored-By: Claude Opus 5.5 --- .../fyi/atstore/directory/searchListings.json | 4 +- .../ListingOAuthScopesPopoverChip.logic.ts | 4 + .../api-directory-listings.functions.ts | 56 +++++++++ src/lexicons/generated/bundle.ts | 4 +- src/lib/browse-listings.test.ts | 11 ++ src/lib/browse-listings.ts | 13 +- src/lib/oauth-listing-auth-probe.ts | 51 ++++++++ src/lib/oauth-permission-grant-ui.ts | 11 ++ src/lib/oauth-space-scopes.test.ts | 86 ++++++++++++++ src/lib/oauth-space-scopes.ts | 111 ++++++++++++++++++ src/routes/_header-layout.index.tsx | 25 ++++ 11 files changed, 371 insertions(+), 5 deletions(-) create mode 100644 src/lib/oauth-space-scopes.test.ts create mode 100644 src/lib/oauth-space-scopes.ts diff --git a/lexicons/fyi/atstore/directory/searchListings.json b/lexicons/fyi/atstore/directory/searchListings.json index adeb630..a2752c5 100644 --- a/lexicons/fyi/atstore/directory/searchListings.json +++ b/lexicons/fyi/atstore/directory/searchListings.json @@ -134,9 +134,9 @@ "items": { "type": "string", "maxLength": 32, - "knownValues": ["open-source", "donations", "official"] + "knownValues": ["spaces", "open-source", "donations", "official"] }, - "description": "Required extras (all): open-source (has a source link), donations (has a donate link), official (has a product account)." + "description": "Required extras (all): spaces (OAuth client requests ATProto Spaces permissioned data), open-source (has a source link), donations (has a donate link), official (has a product account)." }, "limit": { "type": "integer", diff --git a/src/components/ListingOAuthScopesPopoverChip.logic.ts b/src/components/ListingOAuthScopesPopoverChip.logic.ts index 7a76a07..076a0a3 100644 --- a/src/components/ListingOAuthScopesPopoverChip.logic.ts +++ b/src/components/ListingOAuthScopesPopoverChip.logic.ts @@ -16,6 +16,7 @@ type ScopeBucket = | "repo" | "blob" | "api" + | "space" | "transitional" | "other"; @@ -25,6 +26,7 @@ export const BUCKET_LABEL: Record = { repo: "Manage records", blob: "Files & blobs", api: "API", + space: "Permissioned spaces", transitional: "Legacy broad access", other: "Other", }; @@ -35,6 +37,7 @@ const BUCKET_ORDER: Array = [ "repo", "blob", "api", + "space", "transitional", "other", ]; @@ -89,6 +92,7 @@ function scopeTokenBucket(token: string): ScopeBucket { if (res === "repo") return "repo"; if (res === "blob") return "blob"; if (res === "rpc") return "api"; + if (res === "space") return "space"; return "other"; } diff --git a/src/integrations/tanstack-query/api-directory-listings.functions.ts b/src/integrations/tanstack-query/api-directory-listings.functions.ts index 2cc6e3a..baf2410 100644 --- a/src/integrations/tanstack-query/api-directory-listings.functions.ts +++ b/src/integrations/tanstack-query/api-directory-listings.functions.ts @@ -84,6 +84,7 @@ import { computeOAuthLexiconHubData, getOAuthLexiconHubSnapshot, } from "#/lib/oauth-lexicon-hub-snapshot.server"; +import { PERMISSION_GRANT_SPACES_HEADING } from "#/lib/oauth-permission-grant-ui"; import { oauthClientDistinctTokensFromPublishedScopeLine } from "#/lib/oauth-scope-include-parse"; import { compareOAuthLexiconKeysForDisplayOrder, @@ -185,6 +186,27 @@ function listingPublicWhere(table: typeof dbSchema.storeListings, extra?: SQL) { return extra ? and(pub, extra) : pub; } +/** + * The listing's own OAuth client asks for ATProto Spaces (permissioned data): a `space:…` token + * in its published client `scope` line, or an `include:` permission set with a + * `resource: "space"` entry. Deliberately ignores `oauth_scopes_distinct`, which also merges the + * authorization server's `scopes_supported` — a Spaces-capable PDS would flag every app. + * + * Bundle rows probed before the probe knew about spaces fell through to the generic + * "Technical permission" heading followed by a `resource: space.` line, so match that too. + */ +function sqlProbeRequestsSpaces( + probe: typeof dbSchema.storeListingOAuthProbes, +): SQL { + const bundleLines = + "$.summary.scopeHumanReadable[*].includePermissionSet.structuredLines[*]"; + const spaceBundlePath = `${bundleLines} ? (@ == ${JSON.stringify(PERMISSION_GRANT_SPACES_HEADING)} || @ == "resource: space.")`; + return sql`( + coalesce(${probe.clientScopeRawLine} ~* '(^|\\s)space:', false) + or coalesce(${probe.reportJson} @? ${spaceBundlePath}::jsonpath, false) + )`; +} + /** Verified public listings exposed over directory XRPC — must have a published listing.detail AT URI. */ function listingXrpcPublicWhere( table: typeof dbSchema.storeListings, @@ -810,6 +832,11 @@ export interface DirectoryHomePageData { }; /** Data producers whose records are used by the most apps. */ dataProducers: Array; + /** Apps whose OAuth client asks for ATProto Spaces (permissioned data). */ + spaces: { + total: number; + listings: Array; + }; } const CATEGORY_ACCENTS: Array = [ @@ -1445,6 +1472,7 @@ const HOME_GAME_COUNT = 4; const HOME_TAG_COUNT = 16; const HOME_DATA_PRODUCER_COUNT = 8; const HOME_ICON_STACK_COUNT = 4; +const HOME_SPACES_COUNT = 4; function requireCards( cards: Array, @@ -2118,6 +2146,7 @@ const getHomePageData = createServerFn({ method: "GET" }) browseListings, configuredHomeHeroRows, configuredHomePromoRow, + spacesRows, ] = await Promise.all([ context.db .select(listingSelect) @@ -2198,6 +2227,25 @@ const getHomePageData = createServerFn({ method: "GET" }) return row ?? null; })(), + context.db + .select(listingSelect) + .from(table) + .innerJoin( + context.schema.storeListingOAuthProbes, + eq(context.schema.storeListingOAuthProbes.storeListingId, table.id), + ) + .where( + listingPublicWhere( + table, + and( + sqlProbeRequestsSpaces(context.schema.storeListingOAuthProbes), + // `/apps` leaves protocol tooling out; match it so "See all" agrees. + sql`not ${sqlCategorySlugsMatchesLike(table.categorySlugs, "protocol/%")}`, + ), + ), + ) + .orderBy(...orderByPopularListingSort(table)) + .limit(HOME_SPACES_COUNT), ]); if (recentRows.length === 0) { @@ -2276,6 +2324,12 @@ const getHomePageData = createServerFn({ method: "GET" }) dataProducers: buildHomeDataProducers( browseListings.filter((listing) => !isProtocolListing(listing)), ), + spaces: { + total: browseListings.filter( + (listing) => listing.supportsSpaces && !isProtocolListing(listing), + ).length, + listings: spacesRows.map((row) => toListingCard(row)), + }, } satisfies DirectoryHomePageData; }); @@ -2836,6 +2890,7 @@ async function loadBrowseListings(context: { createdAt: table.createdAt, updatedAt: table.updatedAt, oauthLexiconKeys: probe.oauthLexiconKeys, + supportsSpaces: sqlProbeRequestsSpaces(probe), }) .from(table) .leftJoin(probe, eq(probe.storeListingId, table.id)) @@ -2869,6 +2924,7 @@ async function loadBrowseListings(context: { hasAtUri: Boolean(row.atUri?.trim()), hasSourceLink: linkTypes.has("source"), acceptsDonations: linkTypes.has("donate"), + supportsSpaces: row.supportsSpaces === true, }; }); } diff --git a/src/lexicons/generated/bundle.ts b/src/lexicons/generated/bundle.ts index dd7cac3..36219fd 100644 --- a/src/lexicons/generated/bundle.ts +++ b/src/lexicons/generated/bundle.ts @@ -500,10 +500,10 @@ export const lexicons = [ items: { type: "string", maxLength: 32, - knownValues: ["open-source", "donations", "official"], + knownValues: ["spaces", "open-source", "donations", "official"], }, description: - "Required extras (all): open-source (has a source link), donations (has a donate link), official (has a product account).", + "Required extras (all): spaces (OAuth client requests ATProto Spaces permissioned data), open-source (has a source link), donations (has a donate link), official (has a product account).", }, limit: { type: "integer", diff --git a/src/lib/browse-listings.test.ts b/src/lib/browse-listings.test.ts index 0ae3863..1b51532 100644 --- a/src/lib/browse-listings.test.ts +++ b/src/lib/browse-listings.test.ts @@ -33,6 +33,7 @@ function listing(overrides: Partial): BrowseListing { hasAtUri: true, hasSourceLink: false, acceptsDonations: false, + supportsSpaces: false, ...overrides, }; } @@ -130,6 +131,16 @@ describe("listingMatchesFilters", () => { ]); }); + it("filters to apps that support Spaces", () => { + const forum = listing({ name: "Forum", supportsSpaces: true }); + const filters = getBrowseFilters(validateBrowseSearch({ has: "spaces" })); + expect( + [...all, forum] + .filter((l) => listingMatchesFilters(l, filters)) + .map((l) => l.name), + ).toEqual(["Forum"]); + }); + it("matches tags by slug", () => { expect(match({ tag: "developer" })).toEqual(["Stratos"]); }); diff --git a/src/lib/browse-listings.ts b/src/lib/browse-listings.ts index 79680ec..f983013 100644 --- a/src/lib/browse-listings.ts +++ b/src/lib/browse-listings.ts @@ -27,6 +27,8 @@ export interface BrowseListing { hasAtUri: boolean; hasSourceLink: boolean; acceptsDonations: boolean; + /** OAuth client asks for ATProto Spaces (permissioned data) — `space:` scopes or bundles. */ + supportsSpaces: boolean; } /** What a result row renders — the server only sends these fields for the current page. */ @@ -67,10 +69,16 @@ export const BROWSE_SORT_LABELS: Record = { alphabetical: "A–Z", }; -export const BROWSE_EXTRAS = ["open-source", "donations", "official"] as const; +export const BROWSE_EXTRAS = [ + "spaces", + "open-source", + "donations", + "official", +] as const; export type BrowseExtra = (typeof BROWSE_EXTRAS)[number]; export const BROWSE_EXTRA_LABELS: Record = { + spaces: "Supports Spaces", "open-source": "Open source", donations: "Accepts donations", official: "Has official account", @@ -290,6 +298,9 @@ export function listingHasExtra( extra: BrowseExtra, ): boolean { switch (extra) { + case "spaces": { + return listing.supportsSpaces; + } case "open-source": { return listing.hasSourceLink; } diff --git a/src/lib/oauth-listing-auth-probe.ts b/src/lib/oauth-listing-auth-probe.ts index 008317e..c389868 100644 --- a/src/lib/oauth-listing-auth-probe.ts +++ b/src/lib/oauth-listing-auth-probe.ts @@ -28,6 +28,9 @@ import { PERMISSION_GRANT_RECORDS_LIST_LABEL, PERMISSION_GRANT_REMOTE_ACTIONS_HEADING, PERMISSION_GRANT_RPC_METHOD_EXPLAINER, + PERMISSION_GRANT_SPACES_HEADING, + PERMISSION_GRANT_SPACE_MANAGE_LIST_LABEL, + PERMISSION_GRANT_SPACE_RECORDS_LIST_LABEL, PERMISSION_GRANT_UNRECOGNIZED_ENTRY_HEADING, } from "./oauth-permission-grant-ui"; import { @@ -37,6 +40,13 @@ import { parseRpcScopeForStorefront, scopeStringToTokens, } from "./oauth-scope-include-parse"; +import { + describeSpaceAuthority, + describeSpaceScope, + describeSpaceType, + parseSpacePermissionSetEntry, + parseSpaceScopeToken, +} from "./oauth-space-scopes"; export { oauthClientDistinctTokensFromPublishedScopeLine } from "./oauth-scope-include-parse"; @@ -672,6 +682,12 @@ function describeAtprotoScopeToken(token: string): string { const attr = positional ?? sp.get("attr"); return attr ? `Reads identity · ${attr}` : "Reads identity-linked data."; } + case "space": { + const parsed = parseSpaceScopeToken(t); + return parsed + ? describeSpaceScope(parsed) + : "Access to permissioned spaces."; + } default: { return `Technical scope we didn’t summarize: ${token}`; } @@ -874,6 +890,41 @@ function linesForPermissionGrant( const detail = raw.endsWith(".") ? raw : `${raw}.`; return [PERMISSION_GRANT_IDENTITY_HEADING, detail]; } + case "space": { + const space = parseSpacePermissionSetEntry(p); + if (!space) { + return [ + PERMISSION_GRANT_SPACES_HEADING, + "Details not spelled out here.", + ]; + } + const out: Array = [ + PERMISSION_GRANT_SPACES_HEADING, + `${describeSpaceType(space.spaceType)} · ${describeSpaceAuthority(space.authority)}.`, + ]; + if (space.collections.length > 0) { + out.push({ + kind: "unorderedList", + label: PERMISSION_GRANT_SPACE_RECORDS_LIST_LABEL, + items: space.collections, + }); + } + if (space.actions.length > 0) { + out.push({ + kind: "unorderedList", + label: PERMISSION_GRANT_ALLOWED_VERBS_LIST_LABEL, + items: space.actions, + }); + } + if (space.manage.length > 0) { + out.push({ + kind: "unorderedList", + label: PERMISSION_GRANT_SPACE_MANAGE_LIST_LABEL, + items: space.manage, + }); + } + return out; + } default: { return [ PERMISSION_GRANT_OTHER_TECHNICAL_HEADING, diff --git a/src/lib/oauth-permission-grant-ui.ts b/src/lib/oauth-permission-grant-ui.ts index 129efaf..6e81267 100644 --- a/src/lib/oauth-permission-grant-ui.ts +++ b/src/lib/oauth-permission-grant-ui.ts @@ -15,6 +15,8 @@ export const PERMISSION_GRANT_RPC_METHOD_EXPLAINER = "RPC means the app may call specific published API methods on the service below—not arbitrary code on your account."; export const PERMISSION_GRANT_ACCOUNT_RELATED_HEADING = "Account-related data"; export const PERMISSION_GRANT_IDENTITY_HEADING = "Identity / profile"; +/** ATProto Spaces (permissioned data, proposal 0016) — `resource: "space"` bundle rows. */ +export const PERMISSION_GRANT_SPACES_HEADING = "Permissioned spaces"; /** Permission row with an unknown `resource` value. */ export const PERMISSION_GRANT_OTHER_TECHNICAL_HEADING = "Technical permission"; /** `type !== "permission"` rows in lexicon bundles. */ @@ -27,6 +29,14 @@ export const PERMISSION_GRANT_RECORDS_LIST_LABEL = "Records"; export const PERMISSION_GRANT_ALLOWED_VERBS_LIST_LABEL = "Allowed verbs"; /** Subheading for RPC `lxm` names. */ export const PERMISSION_GRANT_BACKEND_CALLS_LIST_LABEL = "API operations"; +/** + * Subheading for record collections inside a space grant. Distinct from + * {@link PERMISSION_GRANT_RECORDS_LIST_LABEL} so private space collections never feed the + * public repo lexicon keys (`extractLexiconKeysFromSummaryScopeHumanReadable`). + */ +export const PERMISSION_GRANT_SPACE_RECORDS_LIST_LABEL = "Records in the space"; +/** Subheading for space `manage` tokens (operations on the spaces themselves). */ +export const PERMISSION_GRANT_SPACE_MANAGE_LIST_LABEL = "Manage spaces"; export interface PermissionGrantUnorderedList { readonly kind: "unorderedList"; @@ -74,6 +84,7 @@ export const PERMISSION_GRANT_SECTION_HEADINGS: ReadonlySet = new Set([ PERMISSION_GRANT_REMOTE_ACTIONS_HEADING, PERMISSION_GRANT_ACCOUNT_RELATED_HEADING, PERMISSION_GRANT_IDENTITY_HEADING, + PERMISSION_GRANT_SPACES_HEADING, PERMISSION_GRANT_OTHER_TECHNICAL_HEADING, PERMISSION_GRANT_UNRECOGNIZED_ENTRY_HEADING, ]); diff --git a/src/lib/oauth-space-scopes.test.ts b/src/lib/oauth-space-scopes.test.ts new file mode 100644 index 0000000..0a505a1 --- /dev/null +++ b/src/lib/oauth-space-scopes.test.ts @@ -0,0 +1,86 @@ +import { describe, expect, it } from "vitest"; + +import { + describeSpaceScope, + isSpaceScopeToken, + parseSpacePermissionSetEntry, + parseSpaceScopeToken, +} from "./oauth-space-scopes"; + +describe("isSpaceScopeToken", () => { + it("matches space: tokens only", () => { + expect(isSpaceScopeToken("space:com.example.bookmarks")).toBe(true); + expect(isSpaceScopeToken("space:*?authority=did:plc:abc123")).toBe(true); + expect(isSpaceScopeToken("repo:com.example.space")).toBe(false); + expect(isSpaceScopeToken("include:com.example.spacePerms")).toBe(false); + expect(isSpaceScopeToken("atproto")).toBe(false); + }); +}); + +describe("parseSpaceScopeToken", () => { + it("defaults authority to self", () => { + expect(parseSpaceScopeToken("space:com.example.bookmarks")).toEqual({ + spaceType: "com.example.bookmarks", + authority: "self", + collections: [], + actions: [], + manage: [], + }); + }); + + it("reads repeated params", () => { + expect( + parseSpaceScopeToken( + "space:com.atmoboards.forum?authority=did:plc:abc123&skey=default&collection=com.atmoboards.thread&action=create&action=update&manage=delete", + ), + ).toEqual({ + spaceType: "com.atmoboards.forum", + authority: "did:plc:abc123", + collections: ["com.atmoboards.thread"], + actions: ["create", "update"], + manage: ["delete"], + }); + }); + + it("rejects a token without a space type", () => { + expect(parseSpaceScopeToken("space")).toBeNull(); + }); +}); + +describe("parseSpacePermissionSetEntry", () => { + it("reads a permission-set space entry", () => { + expect( + parseSpacePermissionSetEntry({ + type: "permission", + resource: "space", + spaceType: "com.atmoboards.forum", + authority: "*", + collection: ["com.atmoboards.thread", "com.atmoboards.reply"], + action: ["read", "create"], + }), + ).toEqual({ + spaceType: "com.atmoboards.forum", + authority: "*", + collections: ["com.atmoboards.thread", "com.atmoboards.reply"], + actions: ["read", "create"], + manage: [], + }); + }); + + it("ignores other resources", () => { + expect( + parseSpacePermissionSetEntry({ type: "permission", resource: "repo" }), + ).toBeNull(); + }); +}); + +describe("describeSpaceScope", () => { + it("summarizes a membership grant", () => { + const parsed = parseSpaceScopeToken( + "space:com.atmoboards.forum?authority=*&action=read_self&manage=update", + ); + expect(parsed && describeSpaceScope(parsed)).toBe( + "Permissioned space · com.atmoboards.forum · spaces you belong to · read own · manage update", + ); + }); +}); diff --git a/src/lib/oauth-space-scopes.ts b/src/lib/oauth-space-scopes.ts new file mode 100644 index 0000000..d1851a5 --- /dev/null +++ b/src/lib/oauth-space-scopes.ts @@ -0,0 +1,111 @@ +/** + * ATProto Spaces (permissioned data, proposals/0016-permissioned-data) as they show up in a + * listing's OAuth scopes: + * + * - a direct scope token: `space:[?authority=…][&skey=…][&collection=…][&action=…][&manage=…]` + * - an `include:` permission set whose `permissions` contain `{ "resource": "space", … }` + * + * Client-safe (no Node imports) so the browse filter, home page, and probe can share it. + */ + +import { atprotoPermissionScopeResource } from "./oauth-scope-include-parse"; + +export const SPACE_SCOPE_RESOURCE = "space" as const; + +export interface ParsedSpaceScope { + /** Space type NSID, or `*` for every type. */ + spaceType: string; + /** Space owner: `self` (default), `*`, or a DID. */ + authority: string; + /** Record collections (empty = the type's declared collections). */ + collections: Array; + /** Record actions (empty = read/create/update/delete). */ + actions: Array; + /** Operations on the spaces themselves (`create` / `update` / `delete`). */ + manage: Array; +} + +/** True for `space:…` OAuth scope tokens. */ +export function isSpaceScopeToken(token: string): boolean { + return atprotoPermissionScopeResource(token) === SPACE_SCOPE_RESOURCE; +} + +function distinct(values: Iterable): Array { + return [...new Set([...values].map((v) => v.trim()).filter(Boolean))]; +} + +/** Values from a scope query param or a permission-set field (string, list, or comma list). */ +function listValues(raw: unknown): Array { + if (Array.isArray(raw)) return distinct(raw.flatMap((v) => listValues(v))); + if (typeof raw === "string") return distinct(raw.split(",")); + return []; +} + +export function parseSpaceScopeToken(token: string): ParsedSpaceScope | null { + if (!isSpaceScopeToken(token)) return null; + const trimmed = token.trim(); + const qIdx = trimmed.indexOf("?"); + const beforeParams = qIdx === -1 ? trimmed : trimmed.slice(0, qIdx); + let params: URLSearchParams; + try { + params = new URLSearchParams(qIdx === -1 ? "" : trimmed.slice(qIdx + 1)); + } catch { + params = new URLSearchParams(); + } + const colonIdx = beforeParams.indexOf(":"); + const spaceType = + (colonIdx === -1 ? "" : beforeParams.slice(colonIdx + 1).trim()) || + params.get("spaceType")?.trim() || + ""; + if (!spaceType) return null; + + return { + spaceType, + authority: params.get("authority")?.trim() || "self", + collections: listValues(params.getAll("collection")), + actions: listValues(params.getAll("action")), + manage: listValues(params.getAll("manage")), + }; +} + +/** A `{ type: "permission", resource: "space", … }` entry from a permission-set lexicon. */ +export function parseSpacePermissionSetEntry( + entry: Record, +): ParsedSpaceScope | null { + if (entry.resource !== SPACE_SCOPE_RESOURCE) return null; + const spaceType = + typeof entry.spaceType === "string" ? entry.spaceType.trim() : ""; + return { + spaceType: spaceType || "*", + authority: + typeof entry.authority === "string" && entry.authority.trim() + ? entry.authority.trim() + : "self", + collections: listValues(entry.collection), + actions: listValues(entry.action), + manage: listValues(entry.manage), + }; +} + +/** `com.atmoboards.forum` → `com.atmoboards.forum`; `*` → `any kind of space`. */ +export function describeSpaceType(spaceType: string): string { + return spaceType === "*" ? "any kind of space" : spaceType; +} + +/** Whose spaces the grant covers, in plain language. */ +export function describeSpaceAuthority(authority: string): string { + if (authority === "self") return "spaces you own"; + if (authority === "*") return "spaces you belong to"; + return `spaces owned by ${authority}`; +} + +/** One-line storefront summary for a `space:` token. */ +export function describeSpaceScope(scope: ParsedSpaceScope): string { + const actions = + scope.actions.length > 0 + ? scope.actions.map((a) => (a === "read_self" ? "read own" : a)) + : ["read", "create", "update", "delete"]; + const manage = + scope.manage.length > 0 ? ` · manage ${scope.manage.join(", ")}` : ""; + return `Permissioned space · ${describeSpaceType(scope.spaceType)} · ${describeSpaceAuthority(scope.authority)} · ${actions.join(", ")}${manage}`; +} diff --git a/src/routes/_header-layout.index.tsx b/src/routes/_header-layout.index.tsx index 4cccf49..efd1f6d 100644 --- a/src/routes/_header-layout.index.tsx +++ b/src/routes/_header-layout.index.tsx @@ -506,6 +506,31 @@ function HomePage() { + {data.spaces.listings.length > 0 ? ( + + + {data.spaces.total > data.spaces.listings.length + ? `All ${formatApps(data.spaces.total)}` + : "Browse"} + + } + /> +
    + {data.spaces.listings.map((listing) => ( +
  • +
    + +
    +
  • + ))} +
+
+ ) : null} +