import React from 'react'; import { Icon } from 'UI'; import Autoplay from './Autoplay'; import Bookmark from 'Shared/Bookmark'; import SharePopup from '../shared/SharePopup/SharePopup'; import copy from 'copy-to-clipboard'; import { Tooltip } from 'react-tippy'; import Issues from './Issues/Issues'; import NotePopup from './components/NotePopup'; import { connectPlayer } from 'Player'; function SubHeader(props) { const [isCopied, setCopied] = React.useState(false); const isAssist = window.location.pathname.includes('/assist/'); const location = props.currentLocation && props.currentLocation.length > 60 ? `${props.currentLocation.slice(0, 60)}...` : props.currentLocation; return (
{location && (
{ copy(props.currentLocation); setCopied(true); setTimeout(() => setCopied(false), 5000); }} > {location}
)} {!isAssist ? (
{props.jiraConfig && props.jiraConfig.token && }
Share
} />
) : null} ); } const SubH = connectPlayer( (state) => ({ currentLocation: state.location }) )(SubHeader); export default React.memo(SubH);