Skip to content

Commit

Permalink
Merge pull request #57 from boostcampwm-2022/feat/recruit-detail
Browse files Browse the repository at this point in the history
feat: ๋ชจ์ง‘ ์ƒ์„ธ ํŽ˜์ด์ง€ ํผ๋ธ”๋ฆฌ์‹ฑ
  • Loading branch information
gchoi96 authored Nov 21, 2022
2 parents 36b2e38 + 2cf5a8f commit 42c8462
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 0 deletions.
18 changes: 18 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"@types/node": "^16.18.3",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"@types/recoil": "^0.0.9",
"axios": "^1.1.3",
"concurrently": "^7.5.0",
"react": "^18.2.0",
Expand Down
4 changes: 4 additions & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Route, Routes } from "react-router-dom";
import axios, { AxiosResponse } from "axios";
import { TIME } from "#constants/time";
import NewCourse from "#pages/NewCourse/NewCourse";
import RecruitDetail from "#pages/RecruitDetail";

function App() {
const [userInfo, setUserInfo] = useRecoilState(userState);
Expand Down Expand Up @@ -52,6 +53,9 @@ function App() {
<Route path="course">
<Route path="new" element={<NewCourse />} />
</Route>
<Route path="recruit">
<Route path="detail" element={<RecruitDetail />} />
</Route>
</Routes>
);
}
Expand Down
8 changes: 8 additions & 0 deletions client/src/pages/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,19 @@ const MainPage = () => {
const handleSignUpClick = () => {
navigate("/signup");
};
const handleCourseNewClick = () => {
navigate("/course/new");
};
const handleRecruitDetailClick = () => {
navigate("/recruit/detail");
};

return (
<>
<button onClick={handleLoginClick}>๋กœ๊ทธ์ธ</button>
<button onClick={handleSignUpClick}>ํšŒ์›๊ฐ€์ž… </button>
<button onClick={handleCourseNewClick}>์ฝ”์Šค๋“ฑ๋ก </button>
<button onClick={handleRecruitDetailClick}>์ฝ”์Šค์ƒ์„ธ </button>
</>
);
};
Expand Down
30 changes: 30 additions & 0 deletions client/src/pages/RecruitDetail.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import styled from "styled-components";
import { flexColumn } from "styles/flex";
import { COLOR } from "styles/color";

export const Title = styled.div`
box-shadow: 0px -4px 4px rgba(0, 0, 0, 0.25);
font-size: 2rem;
font-weight: bold;
padding: 16px 10px 0px 10px;
`;

export const Content = styled.div`
${flexColumn};
align-items: center;
justify-content: space-between;
width: 100%;
height: 380px;
padding: 15px 19px;
div {
margin-bottom: 10px;
width: 100%;
color: ${COLOR.DARK_GRAY};
display: flex;
justify-content: space-between;
p {
font-weight: 500;
color: ${COLOR.BLACK};
}
}
`;
45 changes: 45 additions & 0 deletions client/src/pages/RecruitDetail.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import Header from "#components/Header/Header";
import Button from "#components/Button/Button";
import useMap from "#hooks/useMap";
import { Content, Title } from "./RecruitDetail.styles";

const RecruitDetail = () => {
const { renderMap } = useMap({
height: `${window.innerHeight - 500}px`,
center: { lat: 33.450701, lng: 126.570667 },
});
return (
<>
<Header loggedIn={true} text="๋ชจ์ง‘ ์ƒ์„ธ"></Header>
{renderMap()}
<Title>๋‹ฌ๋ ค~๋‹ฌ๋ ค~</Title>
<Content>
<div>
<span>์ถœ๋ฐœ์ </span>
<p>์ž ์‹ค๋™ 33-3</p>
</div>
<div>
<span>ํŽ˜์ด์Šค</span>
<p>3'30"/km</p>
</div>
<div>
<span>์ง‘ํ•ฉ ์ผ์‹œ</span>
<p>2022๋…„ 11์›” 11์ผ ์˜คํ›„ 07์‹œ</p>
</div>
<div>
<span>๊ฒŒ์‹œ์ž</span>
<p>gchoi96</p>
</div>
<div>
<span>์ฐธ๊ฐ€ ํ˜„ํ™ฉ</span>
<p>1 / 5</p>
</div>
<Button width="fit" onClick={() => alert("์ฐธ์—ฌ API ๋‚ ๋ฆผ~")}>
์ฐธ์—ฌํ•˜๊ธฐ
</Button>
</Content>
</>
);
};

export default RecruitDetail;

0 comments on commit 42c8462

Please sign in to comment.