From 439ea941b0bc0ac9a49f85023b1510114a3d2b96 Mon Sep 17 00:00:00 2001 From: "focp212@naver.com" Date: Thu, 23 Oct 2025 16:07:44 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=B0=EC=A0=9C=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=B9=B4=EB=93=9C=EC=82=AC=20=EC=85=8B=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/card-commission-bottom-sheet.tsx | 16 +++++++- .../ui/credit-card-list-bottom-sheet.tsx | 41 ++++++------------- .../ui/no-interest-info-bottom-sheet.tsx | 8 +++- 3 files changed, 33 insertions(+), 32 deletions(-) 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); };