Skip to content

Commit

Permalink
Fix: 에러문구 경우 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
furaha707 committed Feb 2, 2024
1 parent 5efa137 commit e0fb5f3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/components/priceArea/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,20 @@ const PriceArea = ({
};

const getErrorMessage = () => {
if (0 < price && price <= purchasePrice - cancelFee) {
return <S.ErrorMessage>지금 야놀자에서 취소하는 것보다 손해보는 가격이에요!</S.ErrorMessage>;
if (policyNumber === "YNBD_1" || policyNumber === "YNBD_2") {
if (0 < price && price <= purchasePrice - cancelFee) {
return (
<S.ErrorMessage>지금 야놀자에서 취소하는 것보다 손해보는 가격이에요!</S.ErrorMessage>
);
}
return;
} else if (policyNumber === "YNBD_3") {
if (0 < price && price < purchasePrice) {
return (
<S.ErrorMessage>지금 야놀자에서 취소하는 것보다 손해보는 가격이에요!</S.ErrorMessage>
);
}
}
return;
};

const getCommandMessage = () => {
Expand Down

0 comments on commit e0fb5f3

Please sign in to comment.