ultisuite-client/lib/compose/resolve-compose-identity.ts
2026-05-25 13:52:40 +02:00

9 lines
429 B
TypeScript

import type { Identity } from '@/lib/compose-context'
import { FALLBACK_COMPOSE_IDENTITY } from '@/lib/compose-context'
import { getDefaultComposeIdentity } from '@/lib/stores/compose-identities-store'
/** Default From identity for compose; server-backed when hydrated. */
export function resolveComposeIdentity(accountId?: string | null): Identity {
return getDefaultComposeIdentity(accountId) ?? FALLBACK_COMPOSE_IDENTITY
}