22 lines
635 B
TypeScript
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]);
|
|
}
|