import {useState} from 'react'; import AppBar from '@mui/material/AppBar'; import Toolbar from '@mui/material/Toolbar'; import Typography from '@mui/material/Typography'; import IconButton from '@mui/material/IconButton'; import Tooltip from '@mui/material/Tooltip'; import Icon from '@mui/material/Icon'; import Box from '@mui/material/Box'; import {useTheme} from '@mui/styles'; import useShare from '../../hooks/useShare'; import GenericMenu from '../GenericMenu'; import useActions from './useActions'; import UserIcon from './UserIcon'; import DrawerNotification from '../DrawerNotification'; import useProfile from '../../hooks/useProfile'; import {Chip} from '@mui/material'; const EventBar = ({event, onAdd, goBack, title}) => { const {connected} = useProfile(); const theme = useTheme(); const {share} = useShare(); const [anchorEl, setAnchorEl] = useState(null); const menuActions = useActions({onAdd, eventId: event?.id}); const isCarosterPlusEvent = event?.enabled_modules?.includes('caroster-plus'); return ( {goBack && ( chevron_left )} {title || event.name} {isCarosterPlusEvent && ( )} <> share({ title: `Caroster ${event.name}`, }) } size="large" > share {connected && } setAnchorEl(e.currentTarget)} size="large" > ); }; export default EventBar;