function UnfoldedMap({setMap, setIsMapLoaded}) {
const mapRef = React.useRef(null);
React.useEffect(() => {
const map = mapSDK.createMap({
mapUrl: 'https://studio.unfolded.ai/public/80c800cc-5805-4416-94a5-bd8105cab7f7',
appendToDocument: false,
embed: true,
width: width,
height: 600,
onLoad: () => {
setMap(map);
setIsMapLoaded(true);
}
});
mapRef.current.appendChild(map.iframe);
}, [setMap, setIsMapLoaded]);
return (jsx`
<div className="unfolded">
<div ref=${mapRef} />
</div>
`);
}