diff --git a/src/components/pages/CompanyData/components/DetailsOverlay.tsx b/src/components/pages/CompanyData/components/DetailsOverlay.tsx index b6eac8a24..28b013b6f 100644 --- a/src/components/pages/CompanyData/components/DetailsOverlay.tsx +++ b/src/components/pages/CompanyData/components/DetailsOverlay.tsx @@ -95,6 +95,7 @@ export default function DetailsOverlay({ handleClose={handleClose} open={edit} handleConfirm={handleConfirm} + errorInfo={sharingStateErrorInfo} /> )} diff --git a/src/components/pages/CompanyData/components/EditForm.tsx b/src/components/pages/CompanyData/components/EditForm.tsx index 37cee254b..1c51e7429 100644 --- a/src/components/pages/CompanyData/components/EditForm.tsx +++ b/src/components/pages/CompanyData/components/EditForm.tsx @@ -35,6 +35,7 @@ import { type CompanyDataType, useUpdateCompanySiteAndAddressMutation, type CompanyDataFieldsType, + type SharingStateType, } from 'features/companyData/companyDataApiSlice' import { useSelector } from 'react-redux' import { @@ -53,6 +54,7 @@ interface FormDetailsProps { readonly isAddress?: boolean readonly handleConfirm: () => void readonly newForm?: boolean + readonly errorInfo?: SharingStateType } export default function EditForm({ @@ -62,6 +64,7 @@ export default function EditForm({ isAddress = false, newForm = false, handleConfirm, + errorInfo, }: FormDetailsProps) { const { t } = useTranslation() const [loading, setLoading] = useState(false) @@ -165,6 +168,17 @@ export default function EditForm({ }} isAddress={isAddress} /> + {errorInfo && ( + + {errorInfo.sharingErrorMessage} + + )}