App.js
827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import React from 'react';
import { createGlobalStyle } from 'styled-components';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import dotenv from 'dotenv';
import HomePage from './pages/HomePage';
import LoginPage from './pages/LoginPage';
import SearchPage from './pages/SearchPage';
dotenv.config();
const GlobalStyle = createGlobalStyle`
html,
body,
#root {
margin: 0;
padding: 0;
height: 100%;
}
html {
box-sizing: border-box;
* {
box-sizing: inherit;
}
}
`;
const App = () => (
<BrowserRouter>
<GlobalStyle />
<Switch>
<Route path="/" exact component={HomePage} />
<Route path="/login" exact component={LoginPage} />
<Route path="/search" exact component={SearchPage} />
</Switch>
</BrowserRouter>
);
export default App;