We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 759cc35 + c458004 commit ae4bf0bCopy full SHA for ae4bf0b
my-app/src/app/post/[slug]/page.tsx
@@ -90,7 +90,13 @@ const Post = ({ params }: { params: { slug: number } }) => {
90
};
91
92
const clickJoinButton = () => {
93
- joinMutation.mutate(params.slug);
+ if (postData.status === "CLOSE") {
94
+ alert("해당 모집글은 기간이 종료되어 참여 불가능합니다.");
95
+ } else if (currentPerson === postData.maxCapacity) {
96
+ alert("해당 모집글은 인원이 마감되어 참여 불가능합니다.");
97
+ } else {
98
+ joinMutation.mutate(params.slug);
99
+ }
100
101
102
const loadKakaoMap = (latitude: string, longitude: string) => {
0 commit comments