/** * @file Profile avatar Component */ import {IonIcon} from "@ionic/react"; import {helpOutline, helpSharp} from "ionicons/icons"; import {FC} from "react"; import {TextFill} from "~/components/text-fill"; import {usePersistentStore} from "~/lib/stores/persistent"; import {Profile, Theme} from "~/lib/types"; /** * Profile avatar component props */ interface AvatarProps { /** * Profile */ profile: Partial>; } /** * Profile avatar component * @param props Props * @returns JSX */ export const Avatar: FC = ({profile}) => { // Hooks const theme = usePersistentStore(state => state.theme); // Variables let color = profile.color; if (color === undefined) { color = theme === Theme.DARK ? "#e5e5e5" : "#404040"; } return (
{profile.emoji === undefined ? ( ) : ( {profile.emoji} )}
); };