decord/source/modules/game_claim/UnclaimedGamesActionCreators.tsx

76 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 15067
// Function ID: 114767
2026-07-20 16:05:17 +00:00
// Name: fetchUnclaimedGames
2026-07-24 07:16:23 +00:00
// Dependencies: [5, 15068, 653, 507, 686, 566, 664, 561, 2]
2026-07-20 16:05:17 +00:00
// Exports: useHasUnclaimedGames
2026-07-24 07:16:23 +00:00
// Module 15067 (fetchUnclaimedGames)
2026-07-23 10:11:24 +00:00
import closure_3 from "initialize";
import importDefaultResult from "_isNativeReflectConstruct";
import { Endpoints } from "ME";
import initialize from "initialize";
const require = arg1;
2026-07-20 16:05:17 +00:00
function fetchUnclaimedGames() {
return _fetchUnclaimedGames(...arguments);
}
function _fetchUnclaimedGames() {
// CreateGeneratorClosureLongIndex (0x67)
const obj = callback(tmp);
return obj(...arguments);
}
function useUnclaimedGameIdsForGuild(id, flag) {
if (flag === undefined) {
flag = true;
}
const data = fetchStore(flag).data;
let tmp;
if (null != data) {
tmp = data[id];
}
if (null == tmp) {
tmp = closure_6;
}
return tmp;
}
let closure_6 = [];
2026-07-23 10:11:24 +00:00
initialize = {
2026-07-20 16:05:17 +00:00
getQueryId(arg0) {
let str = null;
if (arg0) {
str = "unclaimed-games";
}
return str;
},
get() {
return importDefaultResult.getMap();
},
load() {
return fetchUnclaimedGames();
},
2026-07-23 10:11:24 +00:00
staleAfter: require("set").Seconds.DAY,
retryConfig: initialize
2026-07-20 16:05:17 +00:00
};
2026-07-23 10:11:24 +00:00
initialize = {
2026-07-20 16:05:17 +00:00
backoff() {
2026-07-23 10:11:24 +00:00
let tmp = importDefault(561);
tmp = new tmp(5 * importDefault(664).Millis.MINUTE);
2026-07-20 16:05:17 +00:00
return tmp;
},
maxRetries: 10
};
2026-07-23 10:11:24 +00:00
const fetchStore = initialize.createFetchStore(importDefaultResult, initialize);
const result = require("ME").fileFinishedImporting("modules/game_claim/UnclaimedGamesActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default { fetch: fetchUnclaimedGames };
export { fetchUnclaimedGames };
export const useUnclaimedGames = fetchStore;
export { useUnclaimedGameIdsForGuild };
export const useHasUnclaimedGames = function useHasUnclaimedGames(id, gameClaimCoachmarkEnabled) {
let flag = gameClaimCoachmarkEnabled;
if (gameClaimCoachmarkEnabled === undefined) {
flag = true;
}
return useUnclaimedGameIdsForGuild(id, flag).length > 0;
};