import React from "react"; import { useNavigate } from 'react-router-dom' import '../UtilComponents/App.css' const Drivers = (props) => { const navigate = useNavigate(); const makeRequestForDriver = async (driverId, driverName) => { navigate('/make-request', {state: {driverId: driverId, driverName: driverName}}) }; return(

Drivers

{props.drivers.map((term) => { const IMAGE_SRC = `http://localhost:8080/driver/${term.id}/profile/picture`; return(
Driver doesn't have an image
{term.name} {term.surname}

Status: {term.status}

Price per kilometer: {term.pricePerKm} MKD

Level: {term.level}

Number of grades: {term.numGrades}

Grade: {term.grade}

makeRequestForDriver(term.id, term.name)}>Request Driver
)})}
) } export default Drivers;