import Image from "next/image"; import { useRef, useState } from "react"; import {motion} from "framer-motion" export default function DraggableComponentsContainer({ content, }: { content: {context:string}[] | undefined; }) { if (content === undefined) return null; return (
{content.map((i) => { return ( ); })}
); } function DraggableComponents({ content, }: {content: string}) { const [isDragging, setIsDragging] = useState(false); const containerRef = useRef(null); const handleDragStart = (event: React.DragEvent) => { setIsDragging(true); if (containerRef.current) { // Serialize the children as a string for dataTransfer const childrenHtml = containerRef.current.innerHTML; event.dataTransfer.setData("text/html", childrenHtml); } }; const handleDragEnd = () => { setIsDragging(false); }; return (

{content}

{/*

{extraInfo}

*/}
); }