Files
discord-decomp/modules/storefront/hooks/useGetOrFetchStorefrontPrices.tsx
T
2026-11-01 12:12:55 +02:00

22 lines
635 B
TypeScript

// Metro module 8681 (f8682).
import { useEffect } from "react";
import { fetchStorefrontPricesForApplicationId, fetchStorefrontPricesForSkuIds } from "../StorefrontActionCreators";
export function useGetOrFetchStorefrontPricesForApplicationId({ applicationId }) {
useEffect(() => {
if (applicationId != null) {
fetchStorefrontPricesForApplicationId({
applicationId
});
}
}, [applicationId]);
}
export function useGetOrFetchStorefrontPricesForSkuIds({ skuIds }) {
useEffect(() => {
if (skuIds.length !== 0) {
fetchStorefrontPricesForSkuIds({
skuIds
});
}
}, [skuIds]);
}