import 'intersection-observer'; // polyfill import {useState} from 'react'; import type {Key} from '@react-types/shared'; import {DraggableTabList} from 'sentry/components/draggableTabs/draggableTabList'; import {TabPanels, Tabs} from 'sentry/components/tabs'; export interface Tab { content: React.ReactNode; key: Key; label: string; queryCount?: number; } export interface DraggableTabBarProps { tabs: Tab[]; tempTabContent: React.ReactNode; } export function DraggableTabBar(props: DraggableTabBarProps) { const [tabs, setTabs] = useState([...props.tabs]); return ( {tabs.map(tab => ( {tab.label} ))} {tabs.map(tab => ( {tab.content} ))} ); }