Skip to content

Commit

Permalink
Merge pull request whatever-mentoring#9 from whatever-mentoring/featu…
Browse files Browse the repository at this point in the history
…re/Main-page

feat: 메인 페이지 ui 제작
  • Loading branch information
chaeyeonan committed Sep 20, 2023
1 parent ae283de commit 97888e6
Show file tree
Hide file tree
Showing 62 changed files with 1,394 additions and 231 deletions.
3 changes: 0 additions & 3 deletions .github/pull_request_template.md

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/main.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

12 changes: 12 additions & 0 deletions public/img/smile-face.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 21 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
import Main from 'pages/Main';
import Answer from 'pages/Answer';
import PostDetail from 'pages/Main/PostDetail';
import Search from 'pages/Main/Search';
import React from 'react';
import { Mypage } from 'pages/Mypage';
import { MyComment } from 'pages/Mypage/MyComment';
import { MyQna } from 'pages/Mypage/MyQna';
import { MyScrap } from 'pages/Mypage/MyScrap';
import { Provision } from 'pages/Mypage/Provision';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import WriteAnswer from 'pages/Answer/WriteAnswer';
import Ask from 'pages/Ask';
import WriteQuestion from 'pages/Ask/WriteQuestion';

function App() {
return (
<BrowserRouter>
<Routes>
{/* MainPage */}
<Route path="/" element={<Main />} />
<Route path="/post/:id" element={<PostDetail />} />
<Route path="/search" element={<Search />} />

{/* AnswerPage */}
<Route path="/answer" element={<Answer />} />
<Route path="/answer/:id" element={<WriteAnswer />} />

{/* AskPage */}
<Route path="/ask" element={<Ask />} />
<Route path="/ask/write" element={<WriteQuestion />} />

{/* MyPage */}
<Route path="/myPage" element={<Mypage />} />
<Route path="/myPage/myQna" element={<MyQna />} />
<Route path="/myPage/myComment" element={<MyComment />} />
<Route path="/myPage/myScrap" element={<MyScrap />} />
<Route path="/myPage/provision" element={<Provision />} />
<Route path="/" element={<Main />} />
</Routes>
</BrowserRouter>
);
Expand Down
13 changes: 11 additions & 2 deletions src/assets/common.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { Link } from 'react-router-dom';
import { styled } from 'styled-components';
import { Palette } from 'styles/Palette';

export const EntireContainer = styled.div<{ homebar?: boolean }>`
export const EntireContainer = styled.div<{
homebar?: boolean;
background?: string;
}>`
padding: 25px 30px;
background: ${Palette.Gray05};
background: ${({ background }) => (background ? background : Palette.White)};
height: ${({ homebar }) =>
homebar ? 'calc(100vh - 156px)' : 'calc(100vh - 60px)'};
overflow: auto;
Expand Down Expand Up @@ -70,3 +74,8 @@ export const TextContainer = styled.div<{ gap?: number }>`
flex-direction: column;
gap: ${({ gap }) => (gap ? gap : 0)}px;
`;

export const StyledLink = styled(Link)<{ color?: string }>`
text-decoration: none;
color: ${({ color }) => (color ? color : Palette.Black)};
`;
10 changes: 10 additions & 0 deletions src/assets/icons/comment-cyni.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/comment-juni.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/assets/icons/comment.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/cta-arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 97888e6

Please sign in to comment.