import React from "react"; import { useLocation, Link } from 'react-router-dom' import CenteredContainer from "../UtilComponents/CenteredContainer"; import '../UtilComponents/App.css' const Car = () => { const location = useLocation(); let driverButton = Go back let adminButton = Go back let button if(localStorage.getItem("driverId")){ button = driverButton } else { button = adminButton } return (

Car for driver

{location.state.car.licensePlate}
Model: {location.state.car.model}
Make: {location.state.car.make}
Year: {location.state.car.year}


{button}
) } export default Car;