diff --git a/src/components/subsidy-request-modals/ApproveCouponCodeRequestModal.jsx b/src/components/subsidy-request-modals/ApproveCouponCodeRequestModal.jsx index 5c40b0dac2..15dfc404f3 100644 --- a/src/components/subsidy-request-modals/ApproveCouponCodeRequestModal.jsx +++ b/src/components/subsidy-request-modals/ApproveCouponCodeRequestModal.jsx @@ -28,13 +28,14 @@ export const ApproveCouponCodeRequestModal = ({ onSuccess, onClose, }) => { + const courseRunIds = useMemo(() => [courseId], [courseId]); const { applicableCoupons, isLoading: isLoadingApplicableCoupons, error: loadApplicableCouponsError, } = useApplicableCoupons({ enterpriseId: enterpriseCustomerUUID, - courseRunIds: [courseId], + courseRunIds, coupons, }); const [selectedCouponId, setSelectedCouponId] = useState(); diff --git a/src/components/subsidy-request-modals/ApproveLicenseRequestModal.jsx b/src/components/subsidy-request-modals/ApproveLicenseRequestModal.jsx index 73095513da..26e7df95c3 100644 --- a/src/components/subsidy-request-modals/ApproveLicenseRequestModal.jsx +++ b/src/components/subsidy-request-modals/ApproveLicenseRequestModal.jsx @@ -28,13 +28,14 @@ export const ApproveLicenseRequestModal = ({ onClose, }) => { const { data: subscriptions } = useContext(SubscriptionContext); + const courseRunIds = useMemo(() => [courseId], [courseId]); const { applicableSubscriptions, isLoading: isLoadingApplicableSubscriptions, error: loadApplicableSubscriptionsError, } = useApplicableSubscriptions({ enterpriseId: enterpriseCustomerUUID, - courseRunIds: [courseId], + courseRunIds, subscriptions, }); @@ -92,7 +93,7 @@ export const ApproveLicenseRequestModal = ({ defaultMessage="Approve License Request" description="Title for the approve license request modal." /> -)} + )} isOpen={isOpen} hasCloseButton onClose={onClose}