MCPcopy Create free account
hub / github.com/ImGoodBai/MapGoGoGo / load

Function load

frontend/src/App.tsx:701–711  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

699 const mapCellId = simulatorPosition ? (simCellInside ? simCellId : null) : gpsCellId;
700
701 async function load() {
702 const [detail, board] = await Promise.all([
703 api.getChallenge(challengeId),
704 api.leaderboard(challengeId),
705 ]);
706 setChallenge(detail.challenge);
707 setCells(detail.cells);
708 setUnlocked(new Set(detail.unlocked.map((item) => item.cell_id)));
709 setMine(new Set(detail.mine.map((item) => item.cell_id)));
710 setLeaderboard(board.leaderboard);
711 }
712
713 useEffect(() => {
714 load().catch((err) => setMessage(String(err)));

Callers 2

ChallengeViewFunction · 0.85
refreshProgressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected