Parcourir la source

Changing useGameInfo to return an empty object while loading

Kirk Trombley il y a 5 ans
Parent
commit
9d87568c5a
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      client/src/hooks/useGameInfo.jsx

+ 1 - 1
client/src/hooks/useGameInfo.jsx

@@ -5,7 +5,7 @@ import { useGameId } from '../domain/gameStore';
 
 export default () => {
   const gameId = useGameId();
-  const [info, setInfo] = useState({ players: null });
+  const [info, setInfo] = useState({});
 
   useEffect(() => {
     // define how to fetch scores