{postContent3?.map(postContent3 => (
diff --git a/gongjakso/src/pages/ProfileRecruited/RecruitedTeam.jsx b/gongjakso/src/pages/ProfileRecruited/RecruitedTeam.jsx
index b9b225d6..15df068a 100644
--- a/gongjakso/src/pages/ProfileRecruited/RecruitedTeam.jsx
+++ b/gongjakso/src/pages/ProfileRecruited/RecruitedTeam.jsx
@@ -3,9 +3,10 @@ import * as S from './RecruitedTeam.Styled';
import TeamBox from '../TeamBox/TeamBox';
import TopButton from '../../pages/HomePage/TopButton';
import Pagination from '../../components/Pagination/Pagination';
-import { getMyRecruiting } from '../../service/profile_service';
+import { getMyInfo, getMyRecruiting } from '../../service/profile_service';
const RecruitedTeam = () => {
+ const [data, setProfileData] = useState();
const [postContent1, setPostContent1] = useState([]);
useEffect(() => {
@@ -14,12 +15,18 @@ const RecruitedTeam = () => {
});
}, []);
+ useEffect(() => {
+ getMyInfo().then(response => {
+ setProfileData(response?.data); // 'response'를 바로 전달
+ });
+ }, []);
+
return (
- 내가 모집 중인 팀
+ {data?.name}님의 모집 기록
{postContent1?.map(postContent1 => (
diff --git a/gongjakso/src/pages/ScrapPage/Scrap.jsx b/gongjakso/src/pages/ScrapPage/Scrap.jsx
index 2eb960e1..06c1e303 100644
--- a/gongjakso/src/pages/ScrapPage/Scrap.jsx
+++ b/gongjakso/src/pages/ScrapPage/Scrap.jsx
@@ -3,11 +3,12 @@ import * as S from './Scrap.Styled';
import TeamBox from '../TeamBox/TeamBox';
import TopButton from '../HomePage/TopButton';
import Pagination from '../../components/Pagination/Pagination';
-import { getMyTeamScrap } from '../../service/profile_service';
+import { getMyInfo, getMyTeamScrap } from '../../service/profile_service';
import NoContents from '../../features/NoContents/NoContents';
const Scrap = () => {
const [page, setPage] = useState(1);
+ const [data, setProfileData] = useState();
const [postContent4, setPostContent4] = useState(); //스크랩 공모전
const [totalPage, setTotalPage] = useState(0);
@@ -18,6 +19,12 @@ const Scrap = () => {
});
}, [page]);
+ useEffect(() => {
+ getMyInfo().then(response => {
+ setProfileData(response?.data); // 'response'를 바로 전달
+ });
+ }, []);
+
const loadScrapedPosts = page => {
getMyTeamScrap(page, 6).then(response => {
setTotalPage(response?.data.totalPages);
@@ -30,7 +37,7 @@ const Scrap = () => {
- 나의 스크랩
+ {data?.name}님의 스크랩
{!postContent4 ? (
diff --git a/gongjakso/src/pages/TeamBox/TeamBox.jsx b/gongjakso/src/pages/TeamBox/TeamBox.jsx
index 6013aee8..fcb71668 100644
--- a/gongjakso/src/pages/TeamBox/TeamBox.jsx
+++ b/gongjakso/src/pages/TeamBox/TeamBox.jsx
@@ -100,33 +100,6 @@ const TeamBox = ({
dispatch(closeConfirmModal());
};
- const startDate = new Date(postContent?.startDate)
- .toLocaleDateString('ko-KR', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit',
- })
- .split('. ')
- .join('.');
-
- const finishDate = new Date(postContent?.finishDate)
- .toLocaleDateString('ko-KR', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit',
- })
- .split('. ')
- .join('.');
-
- const endDate = new Date(postContent?.endDate)
- .toLocaleDateString('ko-KR', {
- year: 'numeric',
- month: '2-digit',
- day: '2-digit',
- })
- .split('. ')
- .join('.');
-
function getDisplayCategory(recruit_part) {
let displayCategory;
@@ -137,12 +110,6 @@ const TeamBox = ({
case '디자인':
displayCategory = '디자인';
break;
- case 'FE':
- displayCategory = '프론트엔드';
- break;
- case 'BE':
- displayCategory = '백엔드';
- break;
case '기타':
displayCategory = '기타';
break;
@@ -153,6 +120,26 @@ const TeamBox = ({
return displayCategory;
}
+ function getDisplayApplyCategory(apply_part) {
+ let displayApplyCategory;
+
+ switch (apply_part) {
+ case '기획':
+ displayApplyCategory = '기획';
+ break;
+ case '디자인':
+ displayApplyCategory = '디자인';
+ break;
+ case '기타':
+ displayApplyCategory = '기타';
+ break;
+ default:
+ displayApplyCategory = apply_part;
+ }
+
+ return displayApplyCategory;
+ }
+
return (
@@ -176,8 +162,9 @@ const TeamBox = ({
- {postContent?.d_day < 0
- ? '마감된 공고'
+ {/*모집팀의 경우 -- 취소 마감 데이터 추가 필요*/}
+ {postContent?.d_day <= 0
+ ? '마감'
: `마감 D-${postContent?.d_day}`}
@@ -217,7 +204,14 @@ const TeamBox = ({
);
},
)
+ ) : postContent?.applicant_id ? (
+
+ {getDisplayApplyCategory(
+ postContent?.apply_part,
+ )}
+
) : (
+ // 내가 모집 중인 팀
postContent?.recruit_part?.map(
(categoryList, index) => {
return (
@@ -239,12 +233,13 @@ const TeamBox = ({
>
)} */}
{showWaitingJoin && (
-
- {postContent?.applyType === 'PASS'
+
+ {postContent?.status === '합류 완료'
? '합류 완료'
- : postContent?.applyType === 'NOT_PASS'
+ : postContent?.status === '미선발'
? '미선발'
: '합류 대기중'}
+ {/*수정 필요. status X*/}
{postContent?.status === 'CLOSE' && (
모집이 마감되었습니다.
diff --git a/gongjakso/src/pages/TeamBox/TeamBoxStyled.jsx b/gongjakso/src/pages/TeamBox/TeamBoxStyled.jsx
index 7bdb9af6..cdaae3ac 100644
--- a/gongjakso/src/pages/TeamBox/TeamBoxStyled.jsx
+++ b/gongjakso/src/pages/TeamBox/TeamBoxStyled.jsx
@@ -146,10 +146,10 @@ export const WaitingJoin = styled.div`
display: flex;
align-items: center;
justify-content: center;
- background: ${({ theme, $applytype }) =>
- $applytype === 'PASS'
+ background: ${({ theme, $status }) =>
+ $status === '합류 완료'
? theme.box1
- : $applytype === 'NOT_PASS'
+ : $status === '미선발'
? theme.LightGrey
: theme.Light1};
border-radius: 50px;
diff --git a/gongjakso/src/service/profile_service.js b/gongjakso/src/service/profile_service.js
index af22d7fb..26379bb8 100644
--- a/gongjakso/src/service/profile_service.js
+++ b/gongjakso/src/service/profile_service.js
@@ -42,11 +42,12 @@ export const getMyRecruiting = async (page, size) => {
};
//팀박스->내가 지원
-export const getMyApplied = async (page, size) => {
- const reqURL = `team/my-apply?page=${page - 1}&size=${size}`;
+export const getMyApplied = async page => {
+ const reqURL = `apply/my?page=${page - 1}`;
try {
const response = await axiosInstanceV2.get(reqURL);
+ console.log(response?.data);
return response.data;
} catch (error) {
console.log('내가 지원한 게시글을 가져올 수 없습니다.');