diff --git a/resources/js/client/admin/components/portfolioConfig/Basic.js b/resources/js/client/admin/components/portfolioConfig/Basic.js index 63324f8e9..8dc0a7815 100644 --- a/resources/js/client/admin/components/portfolioConfig/Basic.js +++ b/resources/js/client/admin/components/portfolioConfig/Basic.js @@ -9,6 +9,7 @@ import PropTypes from 'prop-types'; import ColorPickerPopup from '../ColorPickerPopup'; import { CloseOutlined, CheckOutlined } from '@ant-design/icons'; import SeoPopup from '../SeoPopup'; +import { useSelector } from 'react-redux'; const { Meta } = Card; const { Item } = List; @@ -44,6 +45,7 @@ const Basic = (props) => { const [colorPickerVisible, setColorPickerVisible] = useState(false); const [seoPopupVisible, setSeoPopupVisible] = useState(false); const [seo, setSeo] = useState(null); + const { demoMode } = useSelector(state => state.globalState); useEffect(() => { props.mountedCallBack(); @@ -148,12 +150,15 @@ const Basic = (props) => { } const maintenanceModeOnChange = (checked) => { + if (demoMode) { + Utils.showNotification('This feature is disabled in demo', 'warning'); + } else { + const callback = () => { + setMaintenanceMode(checked); + } - const callback = () => { - setMaintenanceMode(checked); + submitData(CoreConstants.portfolioConfig.MAINTENANCE_MODE, checked, callback); } - - submitData(CoreConstants.portfolioConfig.MAINTENANCE_MODE, checked, callback); } const changeTemplate = ( diff --git a/resources/js/client/admin/components/settings/General.js b/resources/js/client/admin/components/settings/General.js index 2b4915809..5cddc5401 100644 --- a/resources/js/client/admin/components/settings/General.js +++ b/resources/js/client/admin/components/settings/General.js @@ -134,7 +134,7 @@ const General = (props) => { { e.preventDefault(); if (props.globalState.demoMode) { - Utils.showNotification('This feature is not available in Demo', 'warning'); + Utils.showNotification('This feature is disabled in demo', 'warning'); } else { setLoginCredentialVisible(true); } diff --git a/resources/js/client/admin/components/visitor/Visitors.js b/resources/js/client/admin/components/visitor/Visitors.js index 2112e0551..4aec8b625 100644 --- a/resources/js/client/admin/components/visitor/Visitors.js +++ b/resources/js/client/admin/components/visitor/Visitors.js @@ -205,7 +205,7 @@ const Visitors = () => { const showResetConfirm = () => { if (demoMode) { - Utils.showNotification('This feature is not available in Demo', 'warning'); + Utils.showNotification('This feature is disabled in demo', 'warning'); } else { confirm({ confirmLoading: loading,