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