WIP Frontend structure & authentication.

This commit is contained in:
Ahmed Bouhuolia
2020-02-17 00:15:07 +02:00
parent b3849e55e9
commit e5c78fe555
56 changed files with 3539 additions and 322 deletions

View File

@@ -0,0 +1,27 @@
import React from 'react';
import { Redirect, Route, Switch } from 'react-router-dom';
import authenticationRoutes from 'routes/authentication';
export default function({ isAuthenticated =false, ...rest }) {
const to = {pathname: '/dashboard/homepage'};
return isAuthenticated ?
(
<Redirect to={to} />
) : (
<Switch>
<div class="authentication-page">
<div class="authentication-page__form-wrapper">
{ authenticationRoutes.map((route, index) => (
<Route
key={index}
path={route.path}
exact={route.exact}
component={route.component}
/>
))}
</div>
</div>
</Switch>
);
}