From 5667e55256eeff83fb1490c0470206cf5db73204 Mon Sep 17 00:00:00 2001
From: Cho SeungYeon <111514472+layout-SY@users.noreply.github.com>
Date: Sun, 25 May 2025 17:50:59 +0900
Subject: [PATCH 1/3] =?UTF-8?q?feat=20:=20=EC=82=AC=EC=9A=A9=EC=9E=90?=
=?UTF-8?q?=EA=B0=80=20=EB=8C=80=ED=91=9C=20=EC=8A=A4=ED=82=AC/=ED=8F=AC?=
=?UTF-8?q?=EC=A7=80=EC=85=98=EC=9D=84=20=EC=A0=95=ED=95=98=EC=A7=80=20?=
=?UTF-8?q?=EC=95=8A=EC=95=98=EC=9D=84=20=EA=B2=BD=EC=9A=B0=20=ED=94=84?=
=?UTF-8?q?=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=EC=B0=B8=EC=97=AC=20=EB=A7=89?=
=?UTF-8?q?=EA=B8=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/constants/user/modalMessage.ts | 1 +
.../user/projectDetail/ProjectDetail.tsx | 120 ++++++++++--------
src/store/authStore.ts | 2 +
3 files changed, 70 insertions(+), 53 deletions(-)
diff --git a/src/constants/user/modalMessage.ts b/src/constants/user/modalMessage.ts
index 93b1fb95..0fa52b62 100644
--- a/src/constants/user/modalMessage.ts
+++ b/src/constants/user/modalMessage.ts
@@ -26,4 +26,5 @@ export const MODAL_MESSAGE = {
projectDetailFail: '해당 공고가 존재하지 않습니다.',
alreadyApply: '이미 참여한/지원하신 공고 입니다.',
noMemberToEvaluate: '평가 할 멤버가 없습니다.',
+ noTagsData: '대표 스킬/포지션을 입력 하셔야 사용할 수 있습니다.',
} as const;
diff --git a/src/pages/user/projectDetail/ProjectDetail.tsx b/src/pages/user/projectDetail/ProjectDetail.tsx
index c149ddc0..8709c342 100644
--- a/src/pages/user/projectDetail/ProjectDetail.tsx
+++ b/src/pages/user/projectDetail/ProjectDetail.tsx
@@ -20,7 +20,8 @@ const ProjectDetail = () => {
const { projectId } = useParams();
const id = Number(projectId);
const navigate = useNavigate();
- const { isOpen, message, handleModalClose, handleModalOpen } = useModal();
+ const { isOpen, message, handleModalClose, handleModalOpen, handleConfirm } =
+ useModal();
const { data, isLoading, isFetching } = useGetProjectData(id);
const { userData } = useAuthStore((state) => state);
@@ -41,7 +42,11 @@ const ProjectDetail = () => {
}
const handleApplyClick = () => {
- navigate(`${ROUTES.apply}/${id}`);
+ if (!userData?.hasRequiredTags) {
+ navigate(`${ROUTES.apply}/${id}`);
+ } else {
+ handleModalOpen(MODAL_MESSAGE.noTagsData, () => navigate(ROUTES.mypage));
+ }
};
const handleMovetoUserPage = () => {
@@ -50,57 +55,66 @@ const ProjectDetail = () => {
};
return (
-
-
-
-
- {data.title}
-
-
-
-
-
-
- {data.user.nickname}
-
- {formatDate(data.recruitmentEndDate)}
-
-
- {data.views}
-
-
-
-
-
-
-
-
-
-
-
-
- {userData &&
- userData.id !== data.user.id &&
- !data.acceptedIds.includes(userData.id) &&
- !data.applicantIds.includes(userData.id) ? (
-
- ) : null}
-
-
-
-
-
+ <>
+
+
+
+
+ {data.title}
+
+
+
+
+
+
+ {data.user.nickname}
+
+ {formatDate(data.recruitmentEndDate)}
+
+
+ {data.views}
+
+
+
+
+
+
+
+
+
+
+
+
+ {userData &&
+ userData.id !== data.user.id &&
+ !data.acceptedIds.includes(userData.id) &&
+ !data.applicantIds.includes(userData.id) ? (
+
+ ) : null}
+
+
+
+
+
+
+ {message}
+
+ >
);
};
diff --git a/src/store/authStore.ts b/src/store/authStore.ts
index ff5f8d60..c08f4a72 100644
--- a/src/store/authStore.ts
+++ b/src/store/authStore.ts
@@ -6,6 +6,7 @@ export interface UserData {
id: number;
email: string;
nickname: string;
+ hasRequiredTags: boolean;
}
interface AuthState {
@@ -23,6 +24,7 @@ const initialUserData: UserData = {
id: 0,
email: '',
nickname: '',
+ hasRequiredTags: true,
};
export const getStoredUserData = () => {
From a644d64f5b8b703cdcc75ad10b316661621a70c1 Mon Sep 17 00:00:00 2001
From: Cho SeungYeon <111514472+layout-SY@users.noreply.github.com>
Date: Sun, 25 May 2025 17:51:13 +0900
Subject: [PATCH 2/3] =?UTF-8?q?fix=20:=20=EB=A1=9C=EC=A7=81=20=EC=88=98?=
=?UTF-8?q?=EC=A0=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/user/projectDetail/ProjectDetail.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/user/projectDetail/ProjectDetail.tsx b/src/pages/user/projectDetail/ProjectDetail.tsx
index 8709c342..57fa2de0 100644
--- a/src/pages/user/projectDetail/ProjectDetail.tsx
+++ b/src/pages/user/projectDetail/ProjectDetail.tsx
@@ -42,7 +42,7 @@ const ProjectDetail = () => {
}
const handleApplyClick = () => {
- if (!userData?.hasRequiredTags) {
+ if (userData?.hasRequiredTags) {
navigate(`${ROUTES.apply}/${id}`);
} else {
handleModalOpen(MODAL_MESSAGE.noTagsData, () => navigate(ROUTES.mypage));
From c45b46a81e8df092b2e13837a8db60edff7cfdfc Mon Sep 17 00:00:00 2001
From: Cho SeungYeon <111514472+layout-SY@users.noreply.github.com>
Date: Sun, 25 May 2025 23:46:58 +0900
Subject: [PATCH 3/3] =?UTF-8?q?style=20:=20=EB=A6=AC=EB=B7=B0=20=EC=82=AC?=
=?UTF-8?q?=ED=95=AD=20=EB=B0=98=EC=98=81=20=EB=B0=8F=20"=EC=95=8C?=
=?UTF-8?q?=EB=A6=BC=20=EC=97=86=EC=9D=8C"=20=EB=A9=94=EC=84=B8=EC=A7=80?=
=?UTF-8?q?=20=EC=A4=91=EC=95=99=20=EB=B0=B0=EC=B9=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../common/header/Notification/Notification.styled.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/common/header/Notification/Notification.styled.ts b/src/components/common/header/Notification/Notification.styled.ts
index dcca0929..d703886f 100644
--- a/src/components/common/header/Notification/Notification.styled.ts
+++ b/src/components/common/header/Notification/Notification.styled.ts
@@ -6,6 +6,8 @@ export const Container = styled.div`
overflow: hidden;
display: flex;
flex-direction: column;
+ justify-content: center;
+ align-items: center;
padding: 3px;
`;
@@ -24,7 +26,7 @@ export const ScrollArea = styled.div`
export const NotificationHeader = styled.div`
display: flex;
- justify-content: right;
+ justify-content: flex-end;
align-items: center;
height: fit-content;
margin-right: 15px;