import { useSelector } from 'state' import { ShapeTreeNode } from 'types' import ShapeComponent from './shape' export default function Page(): JSX.Element { const shapesToRender = useSelector((s) => s.values.shapesToRender) const allowHovers = useSelector((s) => s.isInAny('selecting', 'text', 'editingShape') ) return ( <> {shapesToRender.map((node) => ( ))} ) } interface ShapeNodeProps { node: ShapeTreeNode allowHovers: boolean } const ShapeNode = ({ node: { shape, children, isEditing, isHovered, isDarkMode, isSelected, isCurrentParent, }, allowHovers, }: ShapeNodeProps) => { return ( <> {children.map((childNode) => ( ))} ) }