Merge branch 'style/homepage' into 'develop'
Style/homepage See merge request !7
Showing
3 changed files
with
51 additions
and
18 deletions
1 | import React from 'react'; | 1 | import React from 'react'; |
2 | import { createGlobalStyle } from 'styled-components'; | 2 | import { createGlobalStyle } from 'styled-components'; |
3 | import { BrowserRouter, Route, Switch } from 'react-router-dom'; | 3 | import { BrowserRouter, Route, Switch } from 'react-router-dom'; |
4 | -import Home from './pages/Home'; | 4 | +import HomePage from './pages/HomePage'; |
5 | import LoginPage from './pages/LoginPage'; | 5 | import LoginPage from './pages/LoginPage'; |
6 | import SearchPage from './pages/SearchPage'; | 6 | import SearchPage from './pages/SearchPage'; |
7 | 7 | ||
... | @@ -26,7 +26,7 @@ const App = () => ( | ... | @@ -26,7 +26,7 @@ const App = () => ( |
26 | <BrowserRouter> | 26 | <BrowserRouter> |
27 | <GlobalStyle /> | 27 | <GlobalStyle /> |
28 | <Switch> | 28 | <Switch> |
29 | - <Route path="/" exact component={Home} /> | 29 | + <Route path="/" exact component={HomePage} /> |
30 | <Route path="/login" exact component={LoginPage} /> | 30 | <Route path="/login" exact component={LoginPage} /> |
31 | <Route path="/search" exact component={SearchPage} /> | 31 | <Route path="/search" exact component={SearchPage} /> |
32 | </Switch> | 32 | </Switch> | ... | ... |
frontend/src/pages/Home.js
deleted
100644 → 0
frontend/src/pages/HomePage.js
0 → 100644
1 | +import React from 'react'; | ||
2 | +import styled from 'styled-components'; | ||
3 | +import Button from '../components/common/Button'; | ||
4 | +import DropDownButton from '../components/common/DropdownButton'; | ||
5 | +import Input from '../components/common/Input'; | ||
6 | + | ||
7 | +const Main = styled.div` | ||
8 | + display: flex; | ||
9 | + height: 100vh; | ||
10 | + align-items: center; | ||
11 | + justify-content: center; | ||
12 | +`; | ||
13 | + | ||
14 | +const SearchBlock = styled.div` | ||
15 | + display: flex; | ||
16 | +`; | ||
17 | + | ||
18 | +const LoginButtonBlock = styled.div` | ||
19 | + position: fixed; | ||
20 | + top: 20px; | ||
21 | + right: 20px; | ||
22 | +`; | ||
23 | + | ||
24 | +const HomePage = () => { | ||
25 | + return ( | ||
26 | + <Main> | ||
27 | + <div>logo</div> | ||
28 | + <SearchBlock> | ||
29 | + <DropDownButton | ||
30 | + fontsize="20px" | ||
31 | + height="50px" | ||
32 | + options={[ | ||
33 | + { id: 1, name: '전체' }, | ||
34 | + { id: 2, name: '개인' }, | ||
35 | + { id: 3, name: '부서' }, | ||
36 | + ]} | ||
37 | + /> | ||
38 | + <Input color="blue" size="14px" width="400px" display /> | ||
39 | + </SearchBlock> | ||
40 | + | ||
41 | + {/* Todo : 로그인 했을 경우 로그인 버튼 숨기기 */} | ||
42 | + <LoginButtonBlock> | ||
43 | + <Button>로그인</Button> | ||
44 | + </LoginButtonBlock> | ||
45 | + </Main> | ||
46 | + ); | ||
47 | +}; | ||
48 | + | ||
49 | +export default HomePage; |
-
Please register or login to post a comment