Skip to content

Commit be8eda8

Browse files
authored
Merge pull request #144 from neelimagoogly/development
Creation of a responsive 'Read and Sign the Manifesto' button
2 parents 963c61d + 6b599cb commit be8eda8

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

src/components/Header.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ import React from 'react';
33
import '../styles/Header.css';
44
import { Button, Jumbotron } from 'react-bootstrap';
55
import Container from 'react-bootstrap/Container';
6+
import {Link} from "react-router-dom";
67

78
function Header() {
9+
810
return (
911
<div className='header'>
1012
<Jumbotron fluid>
11-
<Button fluid="true">Read and Sign the Manifesto</Button>
13+
<Link to='/manifesto'>
14+
<Button fluid="true">Read and Sign the Manifesto</Button>
15+
</Link>
1216
</Jumbotron>
1317
</div>
1418
);

src/index.js

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
3-
import './index.css';
4-
import 'bootstrap/dist/css/bootstrap.min.css';
5-
import { Route, BrowserRouter as Router, Switch, Redirect } from 'react-router-dom';
6-
import Navigation from './components/Navigation';
7-
import Home from './pages/Home';
8-
import Manifesto from './pages/Manifesto';
9-
import Journal from './pages/Journal';
10-
import Contact from './pages/Contact';
11-
import Login from './pages/Login';
12-
import SignUp from './pages/SignUp';
13-
import Footer from './components/Footer';
14-
15-
function App() {
16-
return (
17-
<Router>
18-
<Navigation />
19-
<Switch>
20-
<Route path='/' exact component={Home} />
21-
<Route path='/manifesto' exact component={Manifesto} />
22-
<Route path='/journal' exact component={Journal} />
23-
<Route path='/contact' exact component={Contact} />
24-
<Route path='/login' exact component={Login} />
25-
<Route path='/signup' exact component={SignUp} />
26-
<Redirect to='/' />
27-
</Switch>
28-
<Footer />
29-
</Router>
30-
);
31-
}
32-
33-
ReactDOM.render(<App />, document.getElementById('root'));
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import './index.css';
4+
import 'bootstrap/dist/css/bootstrap.min.css';
5+
import { Route, BrowserRouter as Router, Switch, Redirect } from 'react-router-dom';
6+
import Navigation from './components/Navigation';
7+
import Home from './pages/Home';
8+
import Manifesto from './pages/Manifesto';
9+
import Journal from './pages/Journal';
10+
import Contact from './pages/Contact';
11+
import Login from './pages/Login';
12+
import SignUp from './pages/SignUp';
13+
import Footer from './components/Footer';
14+
import Header from './components/Header';
15+
16+
function App() {
17+
return (
18+
<Router>
19+
<Navigation />
20+
<Switch>
21+
<Route path='/' exact component={Home} />
22+
<Route path='/manifesto' exact component={Manifesto} />
23+
<Route path='/journal' exact component={Journal} />
24+
<Route path='/contact' exact component={Contact} />
25+
<Route path='/login' exact component={Login} />
26+
<Route path='/signup' exact component={SignUp} />
27+
<Route path='/header' component={Header} />
28+
<Redirect to='/' />
29+
</Switch>
30+
<Footer />
31+
</Router>
32+
);
33+
}
34+
35+
ReactDOM.render(<App />, document.getElementById('root'));

0 commit comments

Comments
 (0)