From ceece60e40dbf56449bf9fdc28c291d6abfda48d Mon Sep 17 00:00:00 2001 From: Tony Valle Date: Thu, 26 Oct 2023 15:45:55 +0200 Subject: [PATCH] fix: change to `useCurrentOrgUnitId` after merging in master --- .../RegistrationDataEntry.component.js | 8 ++++---- .../DataEntryTrackedEntityInstance.component.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core_modules/capture-core/components/Pages/New/RegistrationDataEntry/RegistrationDataEntry.component.js b/src/core_modules/capture-core/components/Pages/New/RegistrationDataEntry/RegistrationDataEntry.component.js index d5d956f29d..af18875d9d 100644 --- a/src/core_modules/capture-core/components/Pages/New/RegistrationDataEntry/RegistrationDataEntry.component.js +++ b/src/core_modules/capture-core/components/Pages/New/RegistrationDataEntry/RegistrationDataEntry.component.js @@ -15,7 +15,7 @@ import { ResultsPageSizeContext } from '../../shared-contexts'; import { navigateToEnrollmentOverview } from '../../../../actions/navigateToEnrollmentOverview/navigateToEnrollmentOverview.actions'; import { useLocationQuery } from '../../../../utils/routing'; import { EnrollmentRegistrationEntryWrapper } from '../EnrollmentRegistrationEntryWrapper.component'; -import { useCurrentOrgUnitInfo } from '../../../../hooks/useCurrentOrgUnitInfo'; +import { useCurrentOrgUnitId } from '../../../../hooks/useCurrentOrgUnitId'; const getStyles = ({ typography }) => ({ container: { @@ -97,7 +97,7 @@ const RegistrationDataEntryPlain = ({ const { resultsPageSize } = useContext(ResultsPageSizeContext); const { scopeType, programName, trackedEntityName } = useScopeInfo(selectedScopeId); const titleText = useScopeTitleText(selectedScopeId); - const { id: reduxOrgUnitId } = useCurrentOrgUnitInfo(); + const currentOrgUnitId = useCurrentOrgUnitId(); const handleRegistrationScopeSelection = (id) => { setScopeId(id); @@ -176,7 +176,7 @@ const RegistrationDataEntryPlain = ({ { - const { id: orgUnitId } = useCurrentOrgUnitInfo(); + const orgUnitId = useCurrentOrgUnitId(); const fieldOptions = { theme, fieldLabelMediaBasedClass: teiClasses.fieldLabelMediaBased }; const { trackedEntityType } = teiRegistrationMetadata || {}; const trackedEntityTypeNameLC = trackedEntityType.name.toLocaleLowerCase();