kávék lekérése
This commit is contained in:
1 parent
55ccd302a9
commit
237750bfef
3 files changed
+25
-4
No files matched your search
@@ -1,8 +1,18 @@
|
||||
|
||||
|
||||
function Coffee({coffee}) {
|
||||
function Coffee({ coffee }) {
|
||||
return (
|
||||
<div>Coffee</div>
|
||||
<div className="card w-96 bg-blue-200 card-md shadow-sm">
|
||||
<div className="card-body">
|
||||
<h2 className="card-title">{coffee.name}</h2>
|
||||
<p>Roast:{coffee.roast}</p>
|
||||
<p>Price:{coffee.price}</p>
|
||||
<div className="justify-end card-actions">
|
||||
<button className="btn btn-primary">Módosítás</button>
|
||||
<button className="btn btn-primary">Törlés</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
|
||||
import Coffee from "./Coffee"
|
||||
import { useState,useEffect } from "react"
|
||||
|
||||
function Coffees() {
|
||||
const[coffees,setCoffees]=useState([]);
|
||||
|
||||
const getCoffees=()=>{
|
||||
|
||||
}
|
||||
|
||||
useEffect(()=>{
|
||||
getCoffees();
|
||||
},[]);
|
||||
|
||||
return (
|
||||
<div>Coffees</div>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user