diff --git a/src/entities/payment/ui/card-commission-bottom-sheet.tsx b/src/entities/payment/ui/card-commission-bottom-sheet.tsx index f62078e..dc8e989 100644 --- a/src/entities/payment/ui/card-commission-bottom-sheet.tsx +++ b/src/entities/payment/ui/card-commission-bottom-sheet.tsx @@ -2,6 +2,8 @@ import { motion } from 'framer-motion'; import { IMAGE_ROOT } from '@/shared/constants/common'; import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant'; import { BankFees, CategoryFees, FeeRanges, GeneralTabItems, InstallmentTabItems, MoneyPointTabItems, PaymentFees } from '../model/types'; +import { useStore } from '@/shared/model/store'; +import { ChangeEvent, useState } from 'react'; export interface CardCommissionBottomSheetProps { cardCommissionBottomSheetOn: boolean; @@ -32,6 +34,9 @@ export const CardCommissionBottomSheet = ({ categoryFees, feeRate }: CardCommissionBottomSheetProps) => { + const cardList = useStore.getState().CommonStore.creditCardList; + + const [selectedCard, setSelectedCard] = useState(cardList[0].desc1); const onClickToClose = () => { setCardCommissionBottomSheetOn(false); @@ -93,8 +98,15 @@ export const CardCommissionBottomSheet = ({
카드사
- ) => setSelectedCard(e.target.value) } + > + { + cardList.map((value, index) => ( + + )) + }
diff --git a/src/entities/payment/ui/credit-card-list-bottom-sheet.tsx b/src/entities/payment/ui/credit-card-list-bottom-sheet.tsx index e48a87d..7b0ca6a 100644 --- a/src/entities/payment/ui/credit-card-list-bottom-sheet.tsx +++ b/src/entities/payment/ui/credit-card-list-bottom-sheet.tsx @@ -1,6 +1,8 @@ import { motion } from 'framer-motion'; import { IMAGE_ROOT } from '@/shared/constants/common'; import { BottomSheetMotionDuration, BottomSheetMotionVaiants } from '@/entities/common/model/constant'; +import { useStore } from '@/shared/model/store'; +import { useState } from 'react'; export interface CreditCardListBottomSheetProps { creditCardListBottomSheetOn: boolean; @@ -11,6 +13,9 @@ export const CreditCardListBottomSheet = ({ creditCardListBottomSheetOn, setCreditCardListBottomSheetOn }: CreditCardListBottomSheetProps) => { + const cardList = useStore.getState().CommonStore.creditCardList; + + const [selectedCard, setSelectedCard] = useState(cardList[0].desc1); const onClickToClose = () => { setCreditCardListBottomSheetOn(false); @@ -45,34 +50,14 @@ export const CreditCardListBottomSheet = ({
-
- KB국민 - -
-
- 비씨 - -
-
- 하나(외환) - -
-
- 삼성 - -
-
- 신한 - -
-
- 현대 - -
-
- 롯데 - -
+ { + cardList.map((value, index) => ( +
+ { value.desc1 } + +
+ )) + }
diff --git a/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx b/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx index 1df5f89..c838fc9 100644 --- a/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx +++ b/src/entities/payment/ui/no-interest-info-bottom-sheet.tsx @@ -2,8 +2,9 @@ import { motion } from 'framer-motion'; import { IMAGE_ROOT } from '@/shared/constants/common'; import { BottomSheetMotionVaiants, BottomSheetMotionDuration } from '@/entities/common/model/constant'; import { InstallmentDetails, PaymentInstallmentDetailResponse } from '../model/types'; -import { ChangeEvent } from 'react'; +import { ChangeEvent, useState } from 'react'; import { NumericFormat } from 'react-number-format'; +import { useStore } from '@/shared/model/store'; export interface NoInterestInfoBottomSheetProps { noInterestInfoBottomSheetOn: boolean; @@ -22,7 +23,10 @@ export const NoInterestInfoBottomSheet = ({ installmentDetails, changeToCardCompany }: NoInterestInfoBottomSheetProps) => { - + const cardList = useStore.getState().CommonStore.creditCardList; + + const [selectedCard, setSelectedCard] = useState(cardList[0].desc1); + const onClickToClose = () => { setNoInterestInfoBottomSheetOn(false); };