mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
WIP Frontend structure & authentication.
This commit is contained in:
28
client/src/components/App.js
Normal file
28
client/src/components/App.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {IntlProvider} from 'react-intl';
|
||||
// import {Switch} from 'react-router-dom';
|
||||
import PrivateRoute from 'components/PrivateRoute';
|
||||
import Authentication from 'components/Authentication';
|
||||
import Dashboard from 'components/Dashboard/Dashboard';
|
||||
import messages from 'lang/en';
|
||||
import 'style/App.scss';
|
||||
|
||||
function App(props) {
|
||||
return (
|
||||
<IntlProvider locale={props.locale} messages={messages}>
|
||||
<div className="App">
|
||||
<Authentication isAuthenticated={true} />
|
||||
<PrivateRoute isAuthenticated={true} component={Dashboard} />
|
||||
</div>
|
||||
</IntlProvider>
|
||||
);
|
||||
}
|
||||
App.defaultProps = {
|
||||
locale: 'en',
|
||||
};
|
||||
App.propTypes = {
|
||||
locale: PropTypes.string,
|
||||
};
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user