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'; const EventBar = ({event, onAdd, goBack, title}) => { const {share} = useShare(); const theme = useTheme(); const [anchorEl, setAnchorEl] = useState(null); const menuActions = useActions({onAdd, eventId: event?.id}); return ( {goBack && ( chevron_left )} {title || event.name} <> share({ title: `Caroster ${event.name}`, }) } size="large" > share setAnchorEl(e.currentTarget)} size="large" > ); }; export default EventBar;