import { useEffect, useState } from "react"; import { getEmployees } from "../services/api"; const Employees = () => { const [employeeList, setEmployeeList] = useState([]); useEffect(() => { getEmployees().then(res => setEmployeeList(res.data)) }, []); return (

Dolgozók

{employeeList.map(emp => ( ))}
Id Név Település Fizetés
{emp.id} {emp.name} {emp.city} {emp.salary}
); }; export default Employees;