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

45 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12664
// Function ID: 12665
2026-07-23 10:11:24 +00:00
// Name: isNonEmptyBoardWidget
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 7239, 7236, 7229, 12665, 12666, 2]
2026-07-23 10:11:24 +00:00
// Exports: useDisplayableBoardWidgets
2026-08-25 06:04:03 +00:00
// Module 12664 (isNonEmptyBoardWidget)
import toSubmission from "toSubmission" /* 7239 */;
import useUserProfileWidgetsDefault from "useUserProfileWidgets" /* 12666 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-23 10:11:24 +00:00
function isNonEmptyBoardWidget(games) {
2026-08-24 06:08:38 +00:00
let tmp3 = games instanceof toSubmission.ApplicationWidget;
2026-07-29 08:29:29 +00:00
if (!tmp3) {
2026-08-25 06:04:03 +00:00
let tmp4 = games instanceof tmp(7236).UserProfilePersonalWidget;
2026-08-06 08:05:19 +00:00
if (!tmp4) {
2026-08-25 06:04:03 +00:00
let isGameWidgetResult = tmp(7229).isGameWidget(games);
2026-08-06 08:05:19 +00:00
if (isGameWidgetResult) {
isGameWidgetResult = games.games.length > 0;
}
tmp4 = isGameWidgetResult;
2026-08-25 06:04:03 +00:00
const tmpResult = tmp(7229);
2026-07-23 10:11:24 +00:00
}
2026-08-06 08:05:19 +00:00
tmp3 = tmp4;
2026-07-23 10:11:24 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-23 10:11:24 +00:00
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/user_profile/hooks/useDisplayableBoardWidgets.tsx");
2026-07-23 10:11:24 +00:00
export const useDisplayableBoardWidgets = function useDisplayableBoardWidgets(id) {
2026-08-25 06:04:03 +00:00
isMobileGameCollectionExperimentEnabled = isMobileGameCollectionExperimentEnabled(12665).useIsMobileGameCollectionExperimentEnabled("UserProfileWidgetsBoard");
2026-08-24 06:08:38 +00:00
const tmp2 = useUserProfileWidgetsDefault(id);
2026-07-23 10:11:24 +00:00
importDefault = tmp2;
const items = [isMobileGameCollectionExperimentEnabled, tmp2];
return React.useMemo(() => {
if (isMobileGameCollectionExperimentEnabled) {
2026-08-24 06:08:38 +00:00
let found = closure_1.filter(closure_1_4);
2026-07-23 10:11:24 +00:00
} else {
found = [];
}
return found;
}, items);
};