Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
Svelte
at icy/tmrrpn
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556<script lang="ts"> import type { Snippet } from "svelte"; import type { ProfileRecord } from "$lib/api/records"; import ProfileChrome from "./ProfileChrome.svelte"; import type { DirectVouch, ProfileCounts } from "./types";
interface Identity { did: string; handle: string; }
interface Props { identity: Identity | Promise<Identity>; profile: ProfileRecord | null | Promise<ProfileRecord | null>; counts: ProfileCounts | Promise<ProfileCounts>; viewerFollowRkey?: string | null | Promise<string | null | undefined>; viewerVouch: DirectVouch | null | Promise<DirectVouch | null>; notJoined: boolean | Promise<boolean>; bobbinUrl: string; activeTab: string; content: Snippet; }
let { identity: identityProp, profile: profileProp, counts: countsProp, viewerFollowRkey: viewerFollowRkeyProp, viewerVouch: viewerVouchProp, notJoined: notJoinedProp, bobbinUrl, activeTab, content }: Props = $props();
// an await here suspends the whole navigation, so awaits live below the boundary const identity = $derived(await identityProp); const profile = $derived(await profileProp); const loadedCounts = $derived(await countsProp); const viewerFollowRkey = $derived(await viewerFollowRkeyProp); const viewerVouch = $derived(await viewerVouchProp); const notJoined = $derived(await notJoinedProp);</script>
<ProfileChrome {identity} {profile} {loadedCounts} {viewerFollowRkey} {viewerVouch} {notJoined} {bobbinUrl} {activeTab} {content}/>