WIP / exchangeRate / localize

This commit is contained in:
elforjani3
2020-05-10 20:44:23 +02:00
parent e590a21740
commit cceb4786c2
55 changed files with 2339 additions and 971 deletions

View File

@@ -1,26 +1,32 @@
import React from 'react';
import { Redirect, Route, Switch, Link } from 'react-router-dom';
import BodyClassName from 'react-body-classname';
import BodyClassName from 'react-body-classname';
import authenticationRoutes from 'routes/authentication';
import { FormattedMessage as T, useIntl } from 'react-intl';
export default function AuthenticationWrapper({ isAuthenticated =false, ...rest }) {
const to = {pathname: '/dashboard/homepage'};
export default function AuthenticationWrapper({
isAuthenticated = false,
...rest
}) {
const to = { pathname: '/dashboard/homepage' };
return (
<Route path="/auth">
{ (isAuthenticated) ?
(<Redirect to={to} />) : (
<Route path='/auth'>
{isAuthenticated ? (
<Redirect to={to} />
) : (
<BodyClassName className={'authentication'}>
<Switch>
<div class="authentication-page">
<div class='authentication-page'>
<Link
to={'bigcapital.io'}
className={'authentication-page__goto-bigcapital'}>
Go to bigcapital.com
className={'authentication-page__goto-bigcapital'}
>
<T id={'go_to_bigcapital_com'} />
</Link>
<div class="authentication-page__form-wrapper">
{ authenticationRoutes.map((route, index) => (
<div class='authentication-page__form-wrapper'>
{authenticationRoutes.map((route, index) => (
<Route
key={index}
path={route.path}
@@ -32,8 +38,7 @@ export default function AuthenticationWrapper({ isAuthenticated =false, ...rest
</div>
</Switch>
</BodyClassName>
)
}
)}
</Route>
);
}
}