decord/source/modules/user_profile/hooks/useUserProfileWidgets.tsx

53 lines
1.7 KiB
TypeScript
Raw Normal View History

// Module ID: 9126
// Function ID: 9127
2026-07-20 16:05:17 +00:00
// Name: useUserProfileWidgets
// Dependencies: [502, 7694, 7698, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 9126 (useUserProfileWidgets)
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import UserProfileStore from "UserProfileStore" /* 7694 */;
import WidgetStore from "WidgetStore" /* 7698 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/user_profile/hooks/useUserProfileWidgets.tsx");
2026-07-20 16:05:17 +00:00
export default function useUserProfileWidgets(arg0) {
_require = arg0;
const items = [AuthenticationStore];
2026-07-20 16:05:17 +00:00
const items1 = [arg0];
const stateFromStores = require("initialize").useStateFromStores(items, () => null != closure_0 && AuthenticationStore.getId() === closure_0, items1);
const obj = require("initialize");
const items2 = [WidgetStore];
const stateFromStores1 = require("initialize").useStateFromStores(items2, () => pendingWidgets.getPendingWidgets());
const obj2 = require("initialize");
const items3 = [UserProfileStore];
2026-07-20 16:05:17 +00:00
const items4 = [arg0];
const stateFromStoresArray = require("initialize").useStateFromStoresArray(items3, () => {
2026-07-23 10:11:24 +00:00
if (null == closure_0) {
2026-07-20 16:05:17 +00:00
return [];
} else {
const userProfile = UserProfileStore.getUserProfile(tmp);
2026-07-20 16:05:17 +00:00
let widgets;
2026-07-29 08:29:29 +00:00
if (userProfile != null) {
2026-07-20 16:05:17 +00:00
widgets = userProfile.widgets;
}
2026-07-29 08:29:29 +00:00
if (widgets == null) {
2026-07-20 16:05:17 +00:00
widgets = [];
}
return widgets;
}
}, items4);
let tmp4 = stateFromStoresArray;
if (stateFromStores) {
tmp4 = stateFromStoresArray;
if (null !== stateFromStores1) {
tmp4 = stateFromStores1;
}
}
return tmp4;
};