Files
discord-decomp/modules/collectibles/nameplates/hooks/useFetchNameplate.tsx
T
2026-11-01 12:12:55 +02:00

16 lines
684 B
TypeScript

// Metro module 13730 (f13731).
import { useFetchCollectiblesProduct } from "../../hooks/useFetchCollectiblesProduct";
import { CollectiblesItemType } from "../../../../_bundle/Module1901";
import { getNameplateData } from "../utils";
export function useFetchNameplate(a0) {
const fetchCollectiblesProduct = useFetchCollectiblesProduct(a0);
const { product, isFetching } = fetchCollectiblesProduct;
const nameplateRecord = (product == null ? void 0 : product.items[0]?.type) === CollectiblesItemType.NAMEPLATE ? product.items[0] : void 0;
return {
nameplateProduct: product,
nameplateRecord,
nameplateData: getNameplateData(nameplateRecord),
isFetching
};
}