decord/source/modules/collectibles/profile_effects/useProfileEffect.tsx

53 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 8004
2026-07-27 11:26:19 +00:00
// Function ID: 63785
2026-07-20 16:05:17 +00:00
// Name: useProfileEffect
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 5770, 5786, 5776, 566, 5769, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-25 08:10:48 +00:00
// Module 8004 (useProfileEffect)
2026-07-23 10:11:24 +00:00
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_4 from "_isNativeReflectConstruct";
import { isProfileEffectRecord } from "_isNativeReflectConstruct";
const require = arg1;
let result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/collectibles/profile_effects/useProfileEffect.tsx");
2026-07-20 16:05:17 +00:00
export default function useProfileEffect(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
const items = [_isNativeReflectConstruct, closure_4];
const stateFromStores = _require(566).useStateFromStores(items, () => {
if (null != closure_0) {
const product = outer1_3.getProduct(closure_0);
2026-07-20 16:05:17 +00:00
let first;
if (null != product) {
first = product.items[0];
}
if (tmp4(first)) {
return product.items[0];
} else {
2026-07-23 10:11:24 +00:00
const purchase = outer1_4.getPurchase(closure_0);
2026-07-20 16:05:17 +00:00
let first1;
if (null != purchase) {
first1 = purchase.items[0];
}
let first2;
2026-07-23 10:11:24 +00:00
if (outer1_5(first1)) {
2026-07-20 16:05:17 +00:00
first2 = purchase.items[0];
}
return first2;
}
2026-07-23 10:11:24 +00:00
tmp4 = outer1_5;
2026-07-20 16:05:17 +00:00
}
});
const dependencyMap = tmp2;
const items1 = [null != arg0 && null == stateFromStores, arg0];
const effect = React.useEffect(() => {
if (tmp2) {
2026-07-23 10:11:24 +00:00
const result = callback(tmp2[5]).maybeFetchCollectiblesProduct(callback);
const obj = callback(tmp2[5]);
2026-07-20 16:05:17 +00:00
}
}, items1);
return stateFromStores;
};