'use client' import type { FC } from 'react' import type { AppIconType } from '@/types/app' import data from '@emoji-mart/data' import { init } from 'emoji-mart' import { cn } from '@/utils/classnames' init({ data }) export type AnswerIconProps = { iconType?: AppIconType | null icon?: string | null background?: string | null imageUrl?: string | null } const AnswerIcon: FC = ({ iconType, icon, background, imageUrl, }) => { const wrapperClassName = cn('flex', 'items-center', 'justify-center', 'w-full', 'h-full', 'rounded-full', 'border-[0.5px]', 'border-black/5', 'text-xl') const isValidImageIcon = iconType === 'image' && imageUrl return (
{isValidImageIcon ? answer icon : (icon && icon !== '') ? : }
) } export default AnswerIcon