Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
45 lines
1.6 KiB
TypeScript
45 lines
1.6 KiB
TypeScript
// Module ID: 9124
|
|
// Function ID: 9125
|
|
// Name: useDisplayableBoardWidgets
|
|
// Dependencies: [19, 7706, 7703, 7696, 9125, 9126, 2]
|
|
// Exports: useDisplayableBoardWidgets
|
|
|
|
// Module 9124 (useDisplayableBoardWidgets)
|
|
import UserProfileApplicationWidgetTypes from "UserProfileApplicationWidgetTypes" /* 7706 */;
|
|
import useUserProfileWidgetsDefault from "useUserProfileWidgets" /* 9126 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
function isNonEmptyBoardWidget(games) {
|
|
let tmp3 = games instanceof UserProfileApplicationWidgetTypes.ApplicationWidget;
|
|
if (!tmp3) {
|
|
let tmp4 = games instanceof tmp(7703).UserProfilePersonalWidget;
|
|
if (!tmp4) {
|
|
let isGameWidgetResult = tmp(7696).isGameWidget(games);
|
|
if (isGameWidgetResult) {
|
|
isGameWidgetResult = games.games.length > 0;
|
|
}
|
|
tmp4 = isGameWidgetResult;
|
|
const tmpResult = tmp(7696);
|
|
}
|
|
tmp3 = tmp4;
|
|
}
|
|
return tmp3;
|
|
}
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/user_profile/hooks/useDisplayableBoardWidgets.tsx");
|
|
|
|
export const useDisplayableBoardWidgets = function useDisplayableBoardWidgets(id) {
|
|
isMobileGameCollectionExperimentEnabled = isMobileGameCollectionExperimentEnabled(9125).useIsMobileGameCollectionExperimentEnabled("UserProfileWidgetsBoard");
|
|
const tmp2 = useUserProfileWidgetsDefault(id);
|
|
importDefault = tmp2;
|
|
const items = [isMobileGameCollectionExperimentEnabled, tmp2];
|
|
return noop.useMemo(() => {
|
|
if (isMobileGameCollectionExperimentEnabled) {
|
|
let found = closure_1.filter(isNonEmptyBoardWidget);
|
|
} else {
|
|
found = [];
|
|
}
|
|
return found;
|
|
}, items);
|
|
};
|