|
@@ -4,6 +4,7 @@ import { hasSavedGameInfo } from '../../../domain/localStorageMethods';
|
|
|
import DelayedButton from '../../util/DelayedButton';
|
|
|
import GameCreationForm from '../../util/GameCreationForm';
|
|
|
import styles from './HomePage.module.css';
|
|
|
+import { CSSTransition } from 'react-transition-group';
|
|
|
|
|
|
const Rejoin = () => (
|
|
|
<div className={styles.rejoinSection}>
|
|
@@ -22,8 +23,10 @@ export default () => {
|
|
|
|
|
|
return (
|
|
|
<div className={styles.page}>
|
|
|
+ <CSSTransition in={hasSavedInfo} mountOnEnter unmountOnExit timeout={500} classNames="fade">
|
|
|
+ <Rejoin />
|
|
|
+ </CSSTransition>
|
|
|
<div className={styles.form}><GameCreationForm afterCreate={(gameId) => dispatch.goToLobby(gameId)} /></div>
|
|
|
- {hasSavedInfo && <Rejoin />}
|
|
|
</div>
|
|
|
);
|
|
|
}
|