This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
// Metro module 8479 (f8480).
import { useMemo } from "react";
import { useGetOrFetchApplication } from "../../applications/useGetOrFetchApplications";
import { useGame } from "./useGame";
export default function useResolveGame({ applicationId, gameId }) {
const getOrFetchApplication = useGetOrFetchApplication(gameId == null ? applicationId : void 0);
const memo = useMemo(() => {
let r1 = gameId;
if (gameId == null) {
r1 = getOrFetchApplication == null ? null : getOrFetchApplication.getCanonicalGameId();
}
return r1;
}, [gameId, getOrFetchApplication]);
const game = useGame(memo);
let data = game.data;
const isLoading = game.isLoading;
if (data == null) {
data = null;
}
return {
gameId: memo,
gameRecord: data,
isLoading: gameId == null && applicationId != null && getOrFetchApplication == null || isLoading
};
};