Archived
saving work on ch.11 form
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import React, { useEffect, useState } from "react"
|
||||
import { getGames } from "./GameManager.js"
|
||||
import { UpdateEvent } from "./UpdateEvent.js"
|
||||
|
||||
export const GameList = (props) => {
|
||||
const [ games, setGames ] = useState([])
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
getGames().then(data => setGames(data))
|
||||
},
|
||||
@@ -11,6 +13,8 @@ export const GameList = (props) => {
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<article className="games">
|
||||
<button className="btn btn-2 btn-sep icon-create"
|
||||
onClick={
|
||||
@@ -31,5 +35,6 @@ export const GameList = (props) => {
|
||||
})
|
||||
}
|
||||
</article>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user