Private
Public Access
1
0

chg: dev: more, massive refactor for front-end #4

This commit is contained in:
2026-04-10 19:09:05 +02:00
parent b57442bec1
commit d186a96f0d
13 changed files with 402 additions and 296 deletions

View File

@@ -0,0 +1,26 @@
import { useRef } from 'react';
import { PLAYER_DEF } from '../utils/constants';
const useGameRefs = () => {
const webPlayerRef = useRef(null);
const activePlayerRef = useRef(false);
const bombSelectedRef = useRef(false);
const connectionLostRef = useRef(false);
const redRef = useRef({ ...PLAYER_DEF });
const blueRef = useRef({ ...PLAYER_DEF });
const lastClickedRef = useRef({ red: null, blue: null });
const endRef = useRef(false);
return {
webPlayerRef,
activePlayerRef,
bombSelectedRef,
connectionLostRef,
redRef,
blueRef,
lastClickedRef,
endRef,
};
};
export default useGameRefs;