This commit is contained in:
Dave Richer
2023-12-06 17:35:27 -05:00
parent a043f7be24
commit 5c164f807d
68 changed files with 279 additions and 294 deletions

View File

@@ -5,7 +5,7 @@ import VehicleDetailFormComponent from "./vehicle-detail-form.component";
import { useTranslation } from "react-i18next";
import moment from "moment";
import { DELETE_VEHICLE, UPDATE_VEHICLE } from "../../graphql/vehicles.queries";
import { useHistory } from "react-router-dom";
import { useNavigate } from "react-router-dom";
function VehicleDetailFormContainer({ vehicle, refetch }) {
const { t } = useTranslation();
@@ -13,7 +13,7 @@ function VehicleDetailFormContainer({ vehicle, refetch }) {
const [deleteVehicle] = useMutation(DELETE_VEHICLE);
const [form] = Form.useForm();
const [loading, setLoading] = useState(false);
const history = useHistory();
const history = useNavigate();
const handleDelete = async () => {
setLoading(true);