feat(web): SpaceInviteCard component with snapshot/live/revoked render states
Renders space invite system messages in DMs as embed-style cards on the chat surface. Three render states: snapshot-only on mount (Join enabled, loading dot), live-confirmed (memberCount refreshed from preview), revoked (gray-out + glass-pill indicator). Join targets the space's home origin via joinByCode(code, spaceInstanceOrigin || undefined) — the three-way federation correctness rule. Re-exports getApiForOrigin from api/client to expose the cross-store resolver under a natural import surface.
This commit is contained in:
@@ -812,3 +812,10 @@ export function createApiClient(origin: string, getToken: () => string | null, o
|
||||
const baseUrl = origin ? `${origin}/api` : '/api';
|
||||
return new BackspaceApiClient(baseUrl, getToken, onUnauthorized);
|
||||
}
|
||||
|
||||
// Re-export the cross-store origin resolver so consumers can do
|
||||
// `import { getApiForOrigin } from '../api/client'`. The real implementation
|
||||
// lives in `utils/crossStoreResolvers` to avoid TDZ cycles between stores;
|
||||
// re-exporting here keeps the public import surface clean for callers that
|
||||
// don't need to know about the internal indirection.
|
||||
export { getApiForOrigin } from '../utils/crossStoreResolvers';
|
||||
|
||||
Reference in New Issue
Block a user