mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
WIP Frontend development.
This commit is contained in:
@@ -5,23 +5,25 @@ 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>
|
||||
return (
|
||||
<Route path="/auth">
|
||||
{ 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>)
|
||||
}
|
||||
</Route>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user