import { Tab, TabList } from "@fluentui/react-tabs"; import MapComponent from "../components/map/MapComponent"; import { DragDropContext, Droppable, Draggable } from "@hello-pangea/dnd"; import { useAppStore, setCurrentTab, deleteMapTab, addMapTab, reorderTabs, } from "../store/app"; import { initializeMapState, useMapStore } from "../store/map"; import { initializeObjectsState } from "../store/objects"; import { Button } from "@fluentui/react-components"; import { Add12Filled, Dismiss12Filled, Map16Regular } from "@fluentui/react-icons"; function MapTest() { const { currentTab, tabOrder } = useAppStore() const { id } = useMapStore() const handleDragEnd = (result: any) => { if (!result.destination) return reorderTabs(result.source.index, result.destination.index) } return (
{(provided) => ( setCurrentTab(data.value as string)} style={{ borderBottom: '1px solid var(--colorNeutralShadowKey)' }} onDragStart={(e) => { e.stopPropagation(); // stop TabList from also handling it }} onDrag={(e) => e.stopPropagation()} > {tabOrder.map((key, index) => ( {(dragProvided) => (
}> {id[key]?.mapLabel ?? `Tab ${key}`}
)}
))} {provided.placeholder}
) } export default MapTest;