Skip to content

Commit

Permalink
fix: currentMembership과 currentRecruitment 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Sep 5, 2024
1 parent 4b2ed15 commit 4618a90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/components/bottomsheet/JoinRegularMemberBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,22 @@ import Button from 'wowds-ui/Button';
import styled from '@emotion/styled';
import { Link } from 'react-router-dom';
import RoutePath from '@/routes/routePath';
import { CurrentRecruitmentType } from '@/apis/member/memberType';
import {
CurrentMembershipType,
CurrentRecruitmentType
} from '@/apis/member/memberType';
import {
convertRecruitmentName,
convertRecruitmentPeriod
} from '@/utils/mypage/recruitmentNameFormat';
import useJoinRegularMember from '@/hooks/mutation/useJoinRegularMember';

const JoinRegularMemberBottomSheet = ({
currentRecruitment
currentRecruitment,
currentMembership
}: {
currentRecruitment: CurrentRecruitmentType;
currentMembership: CurrentMembershipType;
}) => {
const { joinRegularMember } = useJoinRegularMember();
const bottomSheetTitle = convertRecruitmentName(
Expand Down Expand Up @@ -81,11 +86,11 @@ const JoinRegularMemberBottomSheet = ({
text={<Text typo="label1">{recruitmentPeriod}</Text>}
/>
<Button
disabled={currentRecruitment ? true : false}
disabled={currentMembership ? true : false}
onClick={() => {
joinRegularMember(currentRecruitment.recruitmentId);
}}>
{currentRecruitment
{currentMembership
? '정회원 가입 조건을 완료해주세요'
: '지원하러 가기'}
</Button>
Expand Down
1 change: 1 addition & 0 deletions src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const Dashboard = () => {
</Wrapper>
{isOpen && (
<JoinRegularMemberBottomSheet
currentMembership={currentMembership}
currentRecruitment={currentRecruitmentRound}
/>
)}
Expand Down

0 comments on commit 4618a90

Please sign in to comment.