|
@@ -1,30 +1,17 @@
|
|
|
-import React from "react";
|
|
|
-import styled from "styled-components";
|
|
|
-import DelayedButton from "../../util/DelayedButton";
|
|
|
-import { dispatch, usePlayerName } from "../../../domain/gameStore";
|
|
|
-
|
|
|
-const Label = styled.span`
|
|
|
- padding: 0.2em;
|
|
|
-`
|
|
|
-
|
|
|
-const StyledDelayButton = styled(DelayedButton)`
|
|
|
- padding: 1em;
|
|
|
- margin: 0.2em;
|
|
|
- margin-top: 0.3em;
|
|
|
-`
|
|
|
+import React from 'react';
|
|
|
+import { dispatch, usePlayerName } from '../../../domain/gameStore';
|
|
|
+import DelayedButton from '../../util/DelayedButton';
|
|
|
+import styles from './Lobby.module.css';
|
|
|
|
|
|
export default () => {
|
|
|
const playerName = usePlayerName();
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
- <Label>Playing as {playerName}</Label>
|
|
|
- <StyledDelayButton
|
|
|
- onEnd={dispatch.startRound}
|
|
|
- countDownFormatter={rem => `Click to cancel, ${rem}s...`}
|
|
|
- >
|
|
|
+ <span className={styles.label}>Playing as {playerName}</span>
|
|
|
+ <DelayedButton autoFocus onEnd={dispatch.startRound} countDownFormatter={(rem) => `Click to cancel, ${rem}s...`}>
|
|
|
Start Game
|
|
|
- </StyledDelayButton>
|
|
|
+ </DelayedButton>
|
|
|
</>
|
|
|
- )
|
|
|
+ );
|
|
|
};
|