Browse Source

Changing useGameInfo to return an empty object while loading

Kirk Trombley 5 năm trước cách đây
mục cha
commit
9d87568c5a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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