Skip to content

Commit

Permalink
feat: main머지하기
Browse files Browse the repository at this point in the history
  • Loading branch information
SOTETERO committed Jun 6, 2024
2 parents e836d88 + ff278e5 commit 4f103d8
Show file tree
Hide file tree
Showing 42 changed files with 1,526 additions and 484 deletions.
115 changes: 115 additions & 0 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-modal": "^3.16.1",
"react-quill": "^2.0.0",
"react-router-dom": "^6.22.3",
"react-scripts": "5.0.1",
"react-select": "^5.8.0",
Expand Down
1 change: 1 addition & 0 deletions public/icons/file-text.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import TeamMemberRecruitmentNotice from "./components/TeamMemberRecruitmentNotic
import RegisterMember from "./pages/RegisterMember/registerMember";
import MyTeamDetail from "./components/MyPage/MyTeamDetail/myTeamDetail";
import ResumeDetail from "./pages/ResumeDetail/resumeDetail";
import TeamDetail from "./pages/TeamAnnouncementDetail/teamAnnouncementDetail";
import TeamAnnouncementDetail from "./pages/TeamAnnouncementDetail/teamAnnouncementDetail";

const App = () => {
const [userInfo, setUserInfo] = useRecoilState(userInfoState);
Expand Down Expand Up @@ -53,13 +55,17 @@ const App = () => {
<Route path="/resumeDetail" element={<ResumeDetail />} />
<Route path="/mypage/*" element={<MyPage />} />
<Route path="/mypage/team/:id" element={<MyTeamDetail />} />
<Route path="/team" element={<TeamSearch />} />
<Route path="/teamannouncement" element={<TeamSearch />} />
<Route path="/member" element={<MemberSearch />} />
<Route path="/login/*" element={<Login />} />
<Route path="/registerTeam" element={<RegisterTeam />} />
<Route path="/registerMember" element={<RegisterMember />} />
<Route path="/contest" element={<Contest />} />
<Route path="/contestDetail" element={<ContestDetail />} />
<Route
path="/teamannouncement/:id"
element={<TeamAnnouncementDetail />}
/>
</Routes>
</BrowserRouter>
</div>
Expand Down
15 changes: 15 additions & 0 deletions src/api/applicationAPI.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { axiosWithAuth } from "./axios";

export const applicationAPI = {
applyTeamAnnouncement(announcementId, resumeId) {
return axiosWithAuth.post(
`/application/${announcementId}?resume_id=${resumeId}`,
);
},
postNewTeamAnnouncement(data, teamId) {
return axiosWithAuth.post("/team-announcement", data);
},
getMyApplications(page, state) {
return axiosWithAuth.get(`/application?page=${page}&state=${state}`);
},
};
3 changes: 2 additions & 1 deletion src/api/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ axiosWithAuth.interceptors.response.use(
const { accessToken } = reIssueResponse.data.data;
localStorage.setItem("access_token", accessToken);
axiosWithAuth.defaults.headers.Authorization = `Bearer ${accessToken}`;
await axios(originRequest).then((res) => {});
originRequest.headers.Authorization = `Bearer ${accessToken}`;
return axiosWithAuth(originRequest);
// window.location.replace("/");
} else {
// window.location.replace("/sign-in");
Expand Down
28 changes: 24 additions & 4 deletions src/api/teamAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const teamAPI = {
name: data.name,
introduction: data.introduction,
domain: data.domain,
location: data.location,
region: data.location,
phoneNumber: data.phoneNumber,
email: data.email,
}),
Expand All @@ -35,16 +35,15 @@ export const teamAPI = {
return axiosWithAuth.get(`/team/${id}`);
},
postNewTeamAnnouncement(data, teamId) {
return axiosWithAuth.post(`/team/${teamId}/announcement`, data);
return axiosWithAuth.post("/team-announcement", data);
},
inviteTeamMember(data) {
return axiosWithAuth.post("/team/invite", data);
},
getMyTeams() {
return axiosWithAuth.get("/user/me/teams");
return axiosWithAuth.get("/user/me/team");
},
getTeamAnnouncements(filter) {
// occupationClassifications가 비어 있는지 확인
const { occupationClassifications, ...rest } = filter;
const params = {
...rest,
Expand All @@ -59,4 +58,25 @@ export const teamAPI = {
},
});
},
getResumeAnnouncements(filter) {
const { occupationClassifications, ...rest } = filter;
const params = {
...rest,
occupationClassifications:
occupationClassifications.length > 0 ? occupationClassifications : "",
};

return axiosWithAuth.get("/resume-announcement", {
params,
paramsSerializer: (params) => {
return qs.stringify(params, { arrayFormat: "repeat" });
},
});
},
getTeamParticipantsByTeamId(id) {
return axiosWithAuth.get(`/team/${id}/participant`);
},
getTeamAnnouncementById(id) {
return axiosWithAuth.get(`/team-announcement/${id}`);
},
};
6 changes: 6 additions & 0 deletions src/api/testDummyData/memberTestData.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const memberTestData = [
"React와 JavaScript 경험이 있는 열정적인 프론트엔드 개발자입니다.",
skill1: "React",
skill2: "JavaScript",
occupationClassifications: [],
},
{
id: 2,
Expand All @@ -19,6 +20,7 @@ const memberTestData = [
introduction: "Node.js와 MongoDB에 능숙한 백엔드 개발자입니다.",
skill1: "Node.js",
skill2: "MongoDB",
occupationClassifications: [],
},
{
id: 3,
Expand All @@ -29,6 +31,7 @@ const memberTestData = [
introduction: "프론트엔드와 백엔드 기술에 능숙한 풀스택 개발자입니다.",
skill1: "React",
skill2: "Node.js",
occupationClassifications: [],
},
{
id: 4,
Expand All @@ -40,6 +43,7 @@ const memberTestData = [
"사용자 중심 설계에 열정을 가진 창의적인 UI/UX 디자이너입니다.",
skill1: "Adobe XD",
skill2: "Figma",
occupationClassifications: [],
},
{
id: 5,
Expand All @@ -50,6 +54,7 @@ const memberTestData = [
introduction: "iOS와 Android 개발에 능숙한 경험 많은 모바일 개발자입니다.",
skill1: "iOS",
skill2: "Android",
occupationClassifications: [],
},
{
id: 6,
Expand All @@ -61,6 +66,7 @@ const memberTestData = [
"머신러닝과 데이터 분석에 대한 배경을 가진 데이터 과학자입니다.",
skill1: "Python",
skill2: "TensorFlow",
occupationClassifications: [],
},
];

Expand Down
6 changes: 6 additions & 0 deletions src/api/testDummyData/teamTestData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const teamTestData = [
category1: "웹 개발",
category2: "인공지능",
like: false,
occupationClassifications: [],
},
{
id: 2,
Expand All @@ -24,6 +25,7 @@ const teamTestData = [
category1: "앱 개발",
category2: "데이터 분석",
like: true,
occupationClassifications: [],
},
{
id: 3,
Expand All @@ -36,6 +38,7 @@ const teamTestData = [
category1: "게임 개발",
category2: "블록체인",
like: true,
occupationClassifications: [],
},
{
id: 4,
Expand All @@ -49,6 +52,7 @@ const teamTestData = [
category1: "데이터 사이언스",
category2: "클라우드 컴퓨팅",
like: true,
occupationClassifications: [],
},
{
id: 5,
Expand All @@ -61,6 +65,7 @@ const teamTestData = [
category1: "로봇공학",
category2: "인터넷 of Things (IoT)",
like: false,
occupationClassifications: [],
},
{
id: 6,
Expand All @@ -74,6 +79,7 @@ const teamTestData = [
category1: "소프트웨어 개발",
category2: "머신 러닝",
like: false,
occupationClassifications: [],
},
];

Expand Down
Loading

0 comments on commit 4f103d8

Please sign in to comment.