decord/source/modules/game_profile/hooks/useSimilarGames.tsx

47 lines
1.5 KiB
TypeScript
Raw Normal View History

// Module ID: 8945
// Function ID: 8946
2026-07-20 16:05:17 +00:00
// Name: useSimilarGames
// Dependencies: [1916, 1371, 8831, 8830, 7361, 504, 8746, 5161, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 8945 (useSimilarGames)
import GameStore from "GameStore" /* 1916 */;
import UserStore from "UserStore" /* 1371 */;
2026-07-23 10:11:24 +00:00
const require = fn;
fn(8831).SIMILAR_GAMES_BLOCKED_GAME_IDS;
2026-07-20 16:05:17 +00:00
let closure_5 = [];
const similarGames = [];
const size = fn(2);
const result = size.fileFinishedImporting("modules/game_profile/hooks/useSimilarGames.tsx");
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
export default function useSimilarGames(arg0) {
const hasItem = set.has(arg0);
const similarGameIds = data(8830).useSimilarGameIds(arg0, !hasItem);
2026-07-29 08:29:29 +00:00
({ data, isLoading, error } = similarGameIds);
2026-08-25 06:04:03 +00:00
if (hasItem) {
2026-07-29 08:29:29 +00:00
let tmp7 = closure_5;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp7 = data;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
data = tmp7;
const obj = data(8830);
const tmp2 = !hasItem;
const games = data(7361).useGames(tmp7);
const tmp3Result = data(7361);
const items = [GameStore];
2026-07-29 08:29:29 +00:00
const items1 = [tmp7];
const stateFromStores = data(504).useStateFromStores(items, () => data.some((item) => null == game.getGame(item) && !game.hasNoData(item) && !game.didFetchingFail(item)), items1);
data(504);
const items2 = [GameStore, UserStore];
2026-07-29 08:29:29 +00:00
[][0] = tmp7;
2026-08-25 06:04:03 +00:00
if (hasItem) {
const obj2 = { isFetching: false, similarGames };
let obj3 = obj2;
2026-08-25 06:04:03 +00:00
} else {
obj3 = { isFetching: null == error && null == data || isLoading || stateFromStores, similarGames: tmp11 };
2026-08-25 06:04:03 +00:00
const tmp13 = null == error && null == data || isLoading || stateFromStores;
2026-07-20 16:05:17 +00:00
}
return obj3;
2026-07-20 16:05:17 +00:00
};