import { useState, useEffect, useRef, forwardRef } from "react"; import { CSSTransition } from "react-transition-group"; import { dispatch } from "../../../domain/gameStore"; import { hasSavedGameInfo } from "../../../domain/localStorageMethods"; import DelayedButton from "../../util/DelayedButton"; import GameCreationForm from "../../util/GameCreationForm"; import styles from "./HomePage.module.css"; export const Rejoin = forwardRef((_, ref) => (
Looks like you were in a game before that you didn't finish! dispatch.rejoinGame()} countDownFormatter={rem => `Rejoining in ${rem}s...`} > Rejoin Game?
)); const HomePage = () => { const [hasSavedInfo, setHasSavedInfo] = useState(false); useEffect(() => { hasSavedGameInfo().then(setHasSavedInfo); }, []); const transitionRef = useRef(null); return (
dispatch.goToLobby(gameId)} />
); }; export default HomePage;