import React from 'react'; import { Redirect, Route, Switch, Link, useLocation } from 'react-router-dom'; import BodyClassName from 'react-body-classname'; import { TransitionGroup, CSSTransition } from 'react-transition-group'; import authenticationRoutes from 'routes/authentication'; import { FormattedMessage as T } from 'react-intl'; import withAuthentication from 'containers/Authentication/withAuthentication'; import { compose } from 'utils'; import Icon from 'components/Icon'; function PageFade(props) { return ( ); } function AuthenticationWrapper({ isAuthorized = false, ...rest }) { const to = { pathname: '/homepage' }; const location = useLocation(); const locationKey = location.pathname; return ( <> {isAuthorized ? ( ) : (
{authenticationRoutes.map((route, index) => ( ))}
)} ); } export default compose( withAuthentication(({ isAuthorized }) => ({ isAuthorized })), )(AuthenticationWrapper);