saving copy-pasta from ch. 9

This commit is contained in:
2022-02-10 13:45:45 -06:00
parent 071552a66a
commit 830780142d
4 changed files with 100 additions and 2 deletions
+12 -1
View File
@@ -6,10 +6,21 @@ export const GameList = (props) => {
useEffect(() => {
getGames().then(data => setGames(data))
}, [])
},
[]
)
return (
<article className="games">
<button className="btn btn-2 btn-sep icon-create"
onClick={
() => {
history.push(
{ pathname: "/games/new" }
)
}
}
>Register New Game</button>
{
games.map(game => {
return <section key={`game--${game.id}`} className="game">