Skip to content

Commit

Permalink
Fix: 모집 마감 알림 (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
designDefined authored Aug 13, 2023
1 parent f1d3c95 commit 099dab3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions src/components/rookie/Progress/PortfolioCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default function PortfolioCard() {
),
)
.finally(() => {
alert("모집이 마감되었습니다.");
queryClient.refetchQueries(["portfolio", "files"]);
});
} else {
Expand All @@ -106,6 +107,7 @@ export default function PortfolioCard() {
),
)
.finally(() => {
alert("모집이 마감되었습니다.");
queryClient.refetchQueries(["portfolio", "files"]);
}),
);
Expand Down Expand Up @@ -171,19 +173,22 @@ export default function PortfolioCard() {
if (input.url.length < 1) {
if (input.id === null) return;
deletePortfolioLink(input.id).finally(() => {
alert("모집이 마감되었습니다.");
void queryClient.refetchQueries(["portfolio", "links"]);
});
return;
}

if (input.id === null) {
postPortfolioLink(input.url).finally(() => {
alert("모집이 마감되었습니다.");
void queryClient.refetchQueries(["portfolio", "links"]);
});
} else {
putPortfolioLink(input.id, input.url)
.catch((e) => console.log(e))
.finally(() => {
alert("모집이 마감되었습니다.");
void queryClient.refetchQueries(["portfolio", "links"]);
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Resume.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function Resume() {
onClick={() => {
submit({
onSuccess: () => alert("저장되었습니다."),
onError: () => alert("오류가 발생했습니다."),
onError: () => alert("모집이 마감되었습니다."),
});
}}
>
Expand All @@ -114,7 +114,7 @@ export default function Resume() {
alert("제출되었습니다.");
navigate(`/recruiting/${recruit_id}`);
},
onError: () => alert("오류가 발생했습니다."),
onError: () => alert("모집이 마감되었습니다."),
})
}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Solve.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function Solve() {
}
}
} catch (e) {
alert("알 수 없는 오류가 발생했습니다");
alert("모집이 마감되었습니다.");
}
setIsSubmitting(false);
};
Expand Down

0 comments on commit 099dab3

Please sign in to comment.