-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathHome.jsx
37 lines (32 loc) · 998 Bytes
/
Home.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from 'react';
import PropTypes from 'prop-types';
import { withTranslation } from 'react-i18next';
import { Route, Routes } from 'react-router-dom';
import config from '../../config/config';
import logo from '../../assets/logo_osrd_seul_blanc.svg';
import NavBarSNCF from '../../common/BootstrapSNCF/NavBarSNCF';
import Editor from './Editor';
class HomeEditorUnplugged extends React.Component {
static propTypes = {
t: PropTypes.func.isRequired,
};
render() {
const { t } = this.props;
return (
<>
<NavBarSNCF appName={t('Editor.title')} logo={logo} />
<div className="no-mastnav">
<Routes>
<Route path="/" element={<Editor urlmap={config.proxy} />} />
<Route
path="/:infra"
element={<Editor urlmap={config.proxy} />}
/>
</Routes>
</div>
</>
);
}
}
const HomeEditor = withTranslation()(HomeEditorUnplugged);
export default HomeEditor;