import React from 'react' import Image from 'next/image' import type { CategoryNode } from '../../types' const ICON_SIZE = 20 const NodeImage: React.FC<{ treeNode: CategoryNode }> = ({ treeNode: { img, imgAR: ar, label } }) => { if (!img) { return null } // treat as URL return (typeof img === 'string') ? ( {`Toggle ) : (img as React.ReactNode) } export default NodeImage