2026-09-12 13:45:10 +00:00
|
|
|
// Module ID: 8802
|
|
|
|
|
// Function ID: 8803
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useResolveGame
|
2026-09-12 13:45:10 +00:00
|
|
|
// Dependencies: [19, 7271, 7412, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-12 13:45:10 +00:00
|
|
|
// Module 8802 (useResolveGame)
|
|
|
|
|
import useGetOrFetchApplications from "useGetOrFetchApplications" /* 7271 */;
|
|
|
|
|
import useGame from "useGame" /* 7412 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
require = fn;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/games/hooks/useResolveGame.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function useResolveGame(arg0) {
|
|
|
|
|
({ applicationId, gameId } = arg0);
|
2026-07-23 10:11:24 +00:00
|
|
|
let getOrFetchApplication;
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp3;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null == gameId) {
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp3 = applicationId;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
getOrFetchApplication = useGetOrFetchApplications.useGetOrFetchApplication(tmp3);
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [gameId, getOrFetchApplication];
|
2026-09-10 05:38:07 +00:00
|
|
|
const memo = noop.useMemo(() => {
|
2026-07-29 08:29:29 +00:00
|
|
|
let tmp = gameId;
|
|
|
|
|
if (null == gameId) {
|
|
|
|
|
let canonicalGameId = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != getOrFetchApplication) {
|
2026-07-29 08:29:29 +00:00
|
|
|
canonicalGameId = obj.getCanonicalGameId();
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
tmp = canonicalGameId;
|
|
|
|
|
obj = getOrFetchApplication;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp;
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items);
|
2026-09-10 05:38:07 +00:00
|
|
|
const game = useGame.useGame(memo);
|
2026-07-29 08:29:29 +00:00
|
|
|
let data = game.data;
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj2 = { gameId: memo, gameRecord: null, isLoading: null };
|
2026-07-29 08:29:29 +00:00
|
|
|
if (data == null) {
|
|
|
|
|
data = null;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj2.gameRecord = data;
|
|
|
|
|
obj2.isLoading = null == gameId && null != applicationId && null == getOrFetchApplication || game.isLoading;
|
|
|
|
|
return obj2;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|