Utilisation de React pour le client

This commit is contained in:
2019-11-28 14:12:48 +01:00
parent 98f4288c8a
commit c6851f3f42
27 changed files with 751 additions and 444 deletions

View File

@ -0,0 +1,24 @@
import React from 'react';
import { HashRouter as Router, Route, Redirect, Switch } from "react-router-dom";
import { store } from '../store/store';
import { Provider } from 'react-redux';
import { HomePage } from './HomePage/HomePage';
import { BoardPage } from './BoardPage/BoardPage';
export class App extends React.Component {
render() {
return (
<Provider store={store}>
<React.Fragment>
<Router>
<Switch>
<Route path="/" exact component={HomePage} />
<Route path="/board/:id" exact component={BoardPage} />
<Route component={() => <Redirect to="/" />} />
</Switch>
</Router>
</React.Fragment>
</Provider>
);
}
}