Skip to content

Commit 3f513ab

Browse files
committed
Router and signin page added
1 parent 376d302 commit 3f513ab

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/App.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import React from 'react';
22
import './App.css';
3-
import { BrowserRouter as Router } from 'react-router-dom';
3+
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
44
import Home from './pages';
5+
import SigninPage from './pages/signin';
56

67
function App() {
78
return (
89
<Router>
9-
<Home />
10+
<Switch>
11+
<Route path='/' component={Home} exact />
12+
<Route path='/signin' component={SigninPage} exact />
13+
</Switch>
1014
</Router>
1115
);
1216
}

src/pages/signin.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
const SigninPage = () => {
4+
return (
5+
<div>
6+
<h1>Signin page</h1>
7+
</div>
8+
);
9+
};
10+
11+
export default SigninPage;

0 commit comments

Comments
 (0)