import React from 'react'; import { RouteComponentProps } from 'react-router'; import { withRouter } from 'react-router-dom'; import { Layout, Icon, Button, Menu, } from 'antd'; import Text from 'antd/lib/typography/Text'; import getCore from '../../core'; const core = getCore(); const serverHost = core.config.backendAPI.slice(0, -7); interface HeaderContainerProps { onLogout: () => void; logoutFetching: boolean; installedAnalytics: boolean; installedAutoAnnotation: boolean; installedTFAnnotation: boolean; installedTFSegmentation: boolean; username: string; } type Props = HeaderContainerProps & RouteComponentProps; const cvatLogo = (): JSX.Element => ; const userLogo = (): JSX.Element => ; function HeaderContainer(props: Props): JSX.Element { const { installedTFSegmentation, installedAutoAnnotation, installedTFAnnotation, installedAnalytics, username, onLogout, logoutFetching, } = props; const renderModels = installedAutoAnnotation || installedTFAnnotation || installedTFSegmentation; return (
{ renderModels && ( ) } { installedAnalytics && ( ) }
{username.length > 14 ? `${username.slice(0, 10)} ...` : username} ) } > {logoutFetching && } Logout
); } export default withRouter(HeaderContainer);