Fist setup js
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
//Modules
|
||||
import React from "react";
|
||||
import {
|
||||
BrowserRouter as Router,
|
||||
Switch,
|
||||
Route,
|
||||
Link
|
||||
} from "react-router-dom";
|
||||
|
||||
//Main routes
|
||||
import {HomePage} from '../';
|
||||
|
||||
//Sub routes
|
||||
|
||||
class GlobalRouter extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
errorlog: [],
|
||||
clear: 'clear'
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
|
||||
return (
|
||||
<Router>
|
||||
<Switch>
|
||||
<Route exact path="/" component={HomePage} />
|
||||
</Switch>
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default GlobalRouter;
|
||||
Reference in New Issue
Block a user