Skip to content

The open alternative to Salesforce, designed for AI.

401 B
Raw Blame
import { isDefined } from 'twenty-shared/utils';
import { IconHash } from 'twenty-ui/icon';
import { useIcons } from 'twenty-ui/icon/provider';

// The icon set loads lazily, so the default stands in until it has
export const useAgentChatChannelIcon = (icon: string | null | undefined) => {
  const { getIcons } = useIcons();

  return (isDefined(icon) ? getIcons()[icon] : undefined) ?? IconHash;
};