MrMirror21

route to main-page

1 import React from 'react'; 1 import React from 'react';
2 import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom'; 2 import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
3 import Landing from './Landing'; 3 import Landing from './Landing';
4 +import Main from './Main';
4 5
5 6
6 class App extends React.Component { 7 class App extends React.Component {
...@@ -9,6 +10,7 @@ class App extends React.Component { ...@@ -9,6 +10,7 @@ class App extends React.Component {
9 <Router> 10 <Router>
10 <Switch> 11 <Switch>
11 <Route exact path="/landing" component={Landing} /> 12 <Route exact path="/landing" component={Landing} />
13 + <Route exact path="/main" component={Main} />
12 <Redirect path="*" to="/landing" /> 14 <Redirect path="*" to="/landing" />
13 </Switch> 15 </Switch>
14 </Router> 16 </Router>
......
...@@ -5,10 +5,9 @@ import "../style/Landing.css"; ...@@ -5,10 +5,9 @@ import "../style/Landing.css";
5 const Button = () => { 5 const Button = () => {
6 return ( 6 return (
7 <div className="mainBtnContainer"> 7 <div className="mainBtnContainer">
8 - <Link to='./main'> 8 + <Link to="/main">
9 <button className="startBtn">Get Started!</button> 9 <button className="startBtn">Get Started!</button>
10 </Link> 10 </Link>
11 -
12 </div> 11 </div>
13 ) 12 )
14 } 13 }
......
1 import React from 'react' 1 import React from 'react'
2 - 2 +import { Link } from 'react-router-dom';
3 +import logo from '../style/Logo.JPG';
3 const Header = () => { 4 const Header = () => {
4 return ( 5 return (
5 - <div className="Header"> 6 + <div className="HeaderContainer"
6 - <img src="../style/Logo.jpg" alt="Logo"></img> 7 + style={{
8 + display: 'inline-block',
9 + width: '100vw',
10 + height: '100px',
11 + background: '#2f3640'
12 + }}
13 + >
14 +
15 + <div className="logo">
16 + <Link to="/landing">
17 + <img
18 + src={logo}
19 + width='100px'
20 + height='100px'
21 + alt="Logo"></img>
22 + </Link>
23 + </div>
24 +
25 +
7 </div> 26 </div>
8 ) 27 )
9 } 28 }
......
...@@ -17,6 +17,7 @@ body { ...@@ -17,6 +17,7 @@ body {
17 width: 100vw; 17 width: 100vw;
18 height: 100vh; 18 height: 100vh;
19 } 19 }
20 +/*
20 .Landingbg:after { 21 .Landingbg:after {
21 content: ''; 22 content: '';
22 position: absolute; 23 position: absolute;
...@@ -28,7 +29,7 @@ body { ...@@ -28,7 +29,7 @@ body {
28 background: rgba(0,0,0,0.001); 29 background: rgba(0,0,0,0.001);
29 box-shadow: inset 100px 100px 250px #000000, inset -100px -100px 250px #000000; 30 box-shadow: inset 100px 100px 250px #000000, inset -100px -100px 250px #000000;
30 } 31 }
31 - 32 +*/
32 .mainTextContainer{ 33 .mainTextContainer{
33 text-align: center; 34 text-align: center;
34 position: relative; 35 position: relative;
...@@ -60,5 +61,5 @@ body { ...@@ -60,5 +61,5 @@ body {
60 } 61 }
61 62
62 .startBtn:hover { 63 .startBtn:hover {
63 - opacity: 0.5; 64 + opacity: 0.8;
64 } 65 }
...\ No newline at end of file ...\ No newline at end of file
......