diff --git a/web/src/routes/[handle]/+layout.ts b/web/src/routes/[handle]/+layout.ts index b2d80edef..8bc9b3bee 100644 --- a/web/src/routes/[handle]/+layout.ts +++ b/web/src/routes/[handle]/+layout.ts @@ -1,4 +1,4 @@ -import { browser, dev } from "$app/environment"; +import { browser } from "$app/environment"; import { error, redirect } from "@sveltejs/kit"; import { createBobbinClient } from "$lib/api/client"; import type { MiniDoc } from "$lib/api/identity"; @@ -90,20 +90,15 @@ export const load: LayoutLoad = async (event) => { const followPromise = stream(resolved.then(({ viewerFollowRkey }) => viewerFollowRkey)); const profilePromise = stream( - resolved.then(async ({ identity }): Promise => { - const profile = await getProfile(ctx, identity.did) + resolved.then(({ identity }): Promise => + getProfile(ctx, identity.did) .then((view) => view.value) .catch((cause) => { if (cause instanceof ClientResponseError && httpStatusFor(cause) === 404) return null; return toHttpError(cause, "Could not load profile"); - }); - if (!previewOrganization) return profile; - return { - ...(profile ?? { $type: "sh.tangled.actor.profile", bluesky: false }), - isOrganization: true - }; - }) + }) + ) ); const notJoinedPromise = stream(