Skip to content

Commit

Permalink
fix: paymentStatus enum 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene028 committed Aug 11, 2024
1 parent 0f07894 commit a222441
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
5 changes: 2 additions & 3 deletions src/apis/member/memberType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PaymentStatus } from '@/types/status';
import { User } from '@/types/user';

import { Status } from '@/types/status';
export interface MemberInfoResponse {
member: User;
currentRecruitmentRound: CurrentRecruitmentType;
Expand All @@ -25,7 +24,7 @@ export interface CurrentMembershipType {
memberId: number;
recruitmentId: number;
regularRequirement: {
paymentStatus: PaymentStatus;
paymentStatus: Status;
allSatisfied: boolean;
paymentSatisfied: boolean;
};
Expand Down
20 changes: 8 additions & 12 deletions src/components/myPage/JoinRegularMember.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import { Text, Flex } from '@/components/common/Wrapper';
import RoutePath from '@/routes/routePath';
import { PaymentStatus } from '@/types/status';
import { Status } from '@/types/status';
import { useNavigate } from 'react-router-dom';
import Box from 'wowds-ui/Box';

const JoinRegularMember = ({
paymentStatus
}: {
paymentStatus: PaymentStatus;
}) => {
const JoinRegularMember = ({ paymentStatus }: { paymentStatus: Status }) => {
const navigate = useNavigate();

const handleClickRoute = () => {
if (paymentStatus !== 'PENDING') {
if (paymentStatus !== 'UNSATISFIED') {
return;
}
navigate(RoutePath.PaymentsCheckout);
Expand All @@ -29,15 +25,15 @@ const JoinRegularMember = ({
</Text>
<Box
text={
paymentStatus === 'PENDING'
paymentStatus === 'UNSATISFIED'
? '이번 학기 회비를 납부해주세요.'
: '이번 학기 회비를 납부했어요.'
}
variant={paymentStatus === 'PENDING' ? 'arrow' : 'text'}
status={paymentStatus === 'PENDING' ? 'error' : 'success'}
variant={paymentStatus === 'UNSATISFIED' ? 'arrow' : 'text'}
status={paymentStatus === 'UNSATISFIED' ? 'error' : 'success'}
subText={
paymentStatus === 'PENDING'
? '이제 카드·페이 등 여러 결제수단을 지원해요.'
paymentStatus === 'UNSATISFIED'
? '이제 카드·계좌이체 등 여러 결제수단을 지원해요.'
: undefined
}
/>
Expand Down

0 comments on commit a222441

Please sign in to comment.