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();