import React from "react"; import { useLocation, useNavigate } from 'react-router-dom' import CenteredContainer from "../UtilComponents/CenteredContainer"; import '../UtilComponents/App.css' const TipDriver = (props) => { const location = useLocation(); const navigate = useNavigate(); const [formData, updateFormData] = React.useState({ driverTipSum : 0, }) const handleChange = (e) => { updateFormData({ ...formData, [e.target.name]: e.target.value.trim() }) } const onFormSubmit = (e) => { e.preventDefault() const gradeNum = formData.driverTipSum; const paymentId = location.state.paymentId; props.onTipDriver(paymentId, gradeNum); navigate("/home") } return (


Tip Driver




Skip



) } export default TipDriver;