import React from "react";
import ClickToCopy from "../util/ClickToCopy";

const PreRound = ({ gameId, playerName, onStart }) => (
  <div className="pre-round">
    <span className="pre-round__name-label">Playing as {playerName}</span>
    <span className="pre-round__game-code">Game Code: <ClickToCopy text={gameId} /></span>
    <button className="btn pre-round__button" onClick={onStart}>Start Game</button>
  </div>
);

export default PreRound;
