diff --git a/src/components/accessories/admin/types/components/deliveryresulttypes/editDeliveryResultType/EditDeliveryResultType.tsx b/src/components/accessories/admin/types/components/deliveryresulttypes/editDeliveryResultType/EditDeliveryResultType.tsx index dd1b8bf0c..595084d11 100644 --- a/src/components/accessories/admin/types/components/deliveryresulttypes/editDeliveryResultType/EditDeliveryResultType.tsx +++ b/src/components/accessories/admin/types/components/deliveryresulttypes/editDeliveryResultType/EditDeliveryResultType.tsx @@ -3,10 +3,8 @@ import React, { useEffect } from "react"; import { useAppDispatch, useAppSelector } from "libraries/hooks/redux"; import { Navigate, useLocation, useParams } from "react-router"; import { DeliveryResultTypeDTO } from "../../../../../../../generated"; -import { IState } from "../../../../../../../types"; -import { ApiResponse } from "../../../../../../../state/types"; import { PATHS } from "../../../../../../../consts"; -import { setTypeMode, TypeMode } from "../../../../../../../state/types/config"; +import { setTypeMode } from "../../../../../../../state/types/config"; import "./styles.scss"; import DeliveryResultTypeForm from "../deliveryResultTypeForm/DeliveryResultTypeForm"; import { getInitialFields } from "../deliveryResultTypeForm/consts"; @@ -17,11 +15,9 @@ export const EditDeliveryResultType = () => { const { t } = useTranslation(); const { state }: { state: DeliveryResultTypeDTO | undefined } = useLocation(); const { code } = useParams(); + const update = useAppSelector((state) => state.types.deliveryResult.update); - - const mode = useSelector( - (state) => state.types.config.mode - ); + const mode = useAppSelector((state) => state.types.config.mode); const handleSubmit = (value: DeliveryResultTypeDTO) => { dispatch(updateDeliveryResultType(value));