51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
// Module ID: 8969
|
|
// Function ID: 8970
|
|
// Name: useProfileEffect
|
|
// Dependencies: [19, 7148, 7164, 7154, 589, 7147, 2]
|
|
// Exports: default
|
|
|
|
// Module 8969 (useProfileEffect)
|
|
import closure_2 from "noop" /* 19 */;
|
|
import closure_3 from "updateCategoriesAndProducts" /* 7148 */;
|
|
import closure_4 from "map" /* 7164 */;
|
|
import { isProfileEffectRecord } from "fromServer" /* 7154 */;
|
|
|
|
const require = arg1;
|
|
let result = require("set").fileFinishedImporting("modules/collectibles/profile_effects/useProfileEffect.tsx");
|
|
|
|
export default function useProfileEffect(arg0) {
|
|
const _require = arg0;
|
|
const items = [closure_3, closure_4];
|
|
const stateFromStores = _require(589).useStateFromStores(items, () => {
|
|
if (null != closure_0) {
|
|
const product = closure_1_3.getProduct(tmp);
|
|
let first;
|
|
if (product != null) {
|
|
first = product.items[0];
|
|
}
|
|
if (closure_1_5(first)) {
|
|
return product.items[0];
|
|
} else {
|
|
const purchase = closure_1_4.getPurchase(tmp);
|
|
let first1;
|
|
if (purchase != null) {
|
|
first1 = purchase.items[0];
|
|
}
|
|
let first2;
|
|
if (tmp4(first1)) {
|
|
first2 = purchase.items[0];
|
|
}
|
|
return first2;
|
|
}
|
|
}
|
|
});
|
|
dependencyMap = tmp2;
|
|
const items1 = [null != arg0 && null == stateFromStores, arg0];
|
|
const effect = React.useEffect(() => {
|
|
if (table) {
|
|
const result = callback(table[5]).maybeFetchCollectiblesProduct(callback);
|
|
const obj = callback(table[5]);
|
|
}
|
|
}, items1);
|
|
return stateFromStores;
|
|
};
|