import React from "react"; import { GuessType } from "../../types/guess"; import { Song } from "../../types/song"; import { playTimes } from "../../constants"; import { Button, Guess, Player, Search, Result } from "../"; import * as Styled from "./index.styled"; interface Props { guesses: GuessType[]; todaysSolution: Song; currentTry: number; didGuess: boolean; setSelectedSong: React.Dispatch>; skip: () => void; guess: () => void; } export function Game({ guesses, todaysSolution, currentTry, didGuess, setSelectedSong, skip, guess, }: Props) { if (didGuess || currentTry === 6) { return ( ); } return ( <> {guesses.map((guess: GuessType, index) => ( ))} ); }