import React from 'react'; import { Icon, Tooltip } from 'UI'; import { PlayerContext } from 'App/components/Session/playerContext'; import { observer } from 'mobx-react-lite'; import Tab from 'Components/Session/Player/SharedComponents/Tab'; function SubHeader() { const { store } = React.useContext(PlayerContext); const { tabStates, currentTab, tabs } = store.get(); const currentLocation = tabStates[currentTab]?.location || ''; const location = currentLocation !== undefined ? currentLocation.length > 70 ? `${currentLocation.slice(0, 70)}...` : currentLocation : undefined; return ( <>
{Array.from(tabs).map((tab, i) => ( ))}
{location && (
{location}
)} ); } export default observer(SubHeader);