Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/meetup/[groupId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const MeetupDetailPage = ({ params }: Props) => {
conditions={{
isHost,
isJoined,
isButtonDisabled: participantCount >= maxParticipants || isPast,
isPast,
isAttendDisabled: participantCount >= maxParticipants,
}}
groupId={groupId}
/>
Expand Down
9 changes: 5 additions & 4 deletions src/components/pages/meetup/meetup-buttons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ interface Props {
conditions: {
isJoined: GetGroupDetailsResponse['userStatus']['isJoined'];
isHost: boolean;
isButtonDisabled: boolean;
isPast: boolean;
isAttendDisabled: boolean;
};
groupId: string;
}

export const MeetupButtons = ({
conditions: { isJoined, isHost, isButtonDisabled },
conditions: { isJoined, isHost, isPast, isAttendDisabled },
groupId,
}: Props) => {
const { open } = useModal();
Expand All @@ -42,13 +43,13 @@ export const MeetupButtons = ({
>
{isHost ? '모임 취소' : '모임 탈퇴'}
</Button>
<Button className='flex-2' disabled={isButtonDisabled} onClick={onEnterChatClick}>
<Button className='flex-2' disabled={isPast} onClick={onEnterChatClick}>
채팅 입장
</Button>
</div>
) : (
<Button
disabled={isButtonDisabled}
disabled={isAttendDisabled || isPast}
onClick={() => open(<MeetupModal groupId={groupId} type='attend' />)}
>
참여하기
Expand Down