diff options
Diffstat (limited to 'modern/src/common/components')
-rw-r--r-- | modern/src/common/components/AddressValue.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modern/src/common/components/AddressValue.js b/modern/src/common/components/AddressValue.js index 767f516b..36369c69 100644 --- a/modern/src/common/components/AddressValue.js +++ b/modern/src/common/components/AddressValue.js @@ -1,4 +1,5 @@ import React, { useEffect, useState } from 'react'; +import { useSelector } from 'react-redux'; import { Link } from '@mui/material'; import { useTranslation } from './LocalizationProvider'; import { useCatch } from '../../reactHelper'; @@ -6,6 +7,8 @@ import { useCatch } from '../../reactHelper'; const AddressValue = ({ latitude, longitude, originalAddress }) => { const t = useTranslation(); + const addressEnabled = useSelector((state) => state.session.server.geocoderEnabled); + const [address, setAddress] = useState(); useEffect(() => { @@ -25,7 +28,10 @@ const AddressValue = ({ latitude, longitude, originalAddress }) => { if (address) { return address; } - return (<Link href="#" onClick={showAddress}>{t('sharedShowAddress')}</Link>); + if (addressEnabled) { + return (<Link href="#" onClick={showAddress}>{t('sharedShowAddress')}</Link>); + } + return ''; }; export default AddressValue; |