add the site-wide components to app.js
This commit is contained in:
parent
53de0e1916
commit
bff021333f
17
src/App.js
17
src/App.js
|
@ -1,18 +1,23 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Provider } from 'react-redux';
|
||||
import React, {Component} from 'react';
|
||||
import {Provider} from 'react-redux';
|
||||
import './App.css';
|
||||
import { Route } from 'react-router-dom';
|
||||
import {Route} from 'react-router-dom';
|
||||
import Home from './containers/Home';
|
||||
import TopicsList from './containers/TopicsList';
|
||||
import store from './store/configureStore';
|
||||
import Header from "./components/Header";
|
||||
import Footer from "./components/Footer";
|
||||
|
||||
class App extends Component {
|
||||
render() {
|
||||
return (
|
||||
<Provider store={ store }>
|
||||
<Provider store={store}>
|
||||
|
||||
<div className="App">
|
||||
<Route exact={ true } path="/" component={ Home } />
|
||||
<Route path="/topics" component={ TopicsList } />
|
||||
<Header/>
|
||||
<Route exact={true} path="/" component={Home}/>
|
||||
<Route path="/topics" component={TopicsList}/>
|
||||
<Footer/>
|
||||
</div>
|
||||
</Provider>
|
||||
);
|
||||
|
|
|
@ -16,12 +16,10 @@ class Home extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Header/>
|
||||
<Search/>
|
||||
<RandomTopic/>
|
||||
<RandomLocation/>
|
||||
<RandomDate/>
|
||||
<Footer/>
|
||||
</div>
|
||||
);
|
||||
//
|
||||
|
@ -41,7 +39,6 @@ class Home extends React.Component {
|
|||
// })}
|
||||
// </div>
|
||||
// </div>
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user