Files
Psychotoxical-psysonic/src/music-network/ui/useEnrichmentPrimaryIcon.ts
T

13 lines
510 B
TypeScript

import type { PresetIcon } from '../contracts/PresetManifest';
import { useEnrichmentPrimary } from './useEnrichmentPrimary';
/**
* Manifest icon id of the current enrichment-primary provider, or null when no
* primary is set. Use it to render the love affordance with the active
* provider's glyph (via `renderPresetIcon`) so the love button is never
* hardcoded to one provider's logo.
*/
export function useEnrichmentPrimaryIcon(): PresetIcon | null {
return useEnrichmentPrimary()?.icon ?? null;
}