diff --git a/src/client/foundation/pages/Top/internal/ChargeDialog/ChargeDialog.jsx b/src/client/foundation/pages/Top/internal/ChargeDialog/ChargeDialog.jsx index 4542e6912..a1da2d689 100644 --- a/src/client/foundation/pages/Top/internal/ChargeDialog/ChargeDialog.jsx +++ b/src/client/foundation/pages/Top/internal/ChargeDialog/ChargeDialog.jsx @@ -1,13 +1,14 @@ import { motion } from "framer-motion"; import React, { forwardRef, useCallback, useState } from "react"; -import zenginCode from "zengin-code"; import { Dialog } from "../../../../components/layouts/Dialog"; import { Spacer } from "../../../../components/layouts/Spacer"; import { Stack } from "../../../../components/layouts/Stack"; import { Heading } from "../../../../components/typographies/Heading"; +import { useFetch } from "../../../../hooks/useFetch"; import { useMutation } from "../../../../hooks/useMutation"; import { Space } from "../../../../styles/variables"; +import { jsonFetcher } from "../../../../utils/HttpUtils"; const CANCEL = "cancel"; const CHARGE = "charge"; @@ -67,6 +68,12 @@ export const ChargeDialog = forwardRef(({ onComplete }, ref) => { [charge, bankCode, branchCode, accountNo, amount, onComplete, clearForm], ); + const { data: zenginCode } = useFetch("/api/zengin-code", jsonFetcher); + + if (zenginCode === null) { + return