瀏覽代碼

Changing useGameInfo to return an empty object while loading

Kirk Trombley 5 年之前
父節點
當前提交
9d87568c5a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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