/* eslint-disable @next/next/no-img-element */ // Why disabled: // avatars.dicebear.com provides svg avatars // next/image needs dangerouslyAllowSVG option for that import React, { ReactNode } from 'react'; import { mdiImageOutline } from '@mdi/js'; import BaseIcon from './BaseIcon'; type Props = { name: string; image?: object | null; api?: string; className?: string; imageClassName?: string; children?: ReactNode; }; export default function ImageField({ name, image, className = '', imageClassName = '', children, }: Props) { const imageSrc = image && image[0] ? `${image[0].publicUrl}` : ''; return (
{imageSrc ? ( {name} ) : (
)} {children}
); }