import React, { useEffect } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { Map } from 'immutable'; import { Box, ContentLayout, Alert, Typography, } from '@strapi/design-system'; import { useNotification } from '@strapi/strapi/admin'; import { getFetchClient } from '@strapi/admin/strapi-admin'; import { useIntl } from 'react-intl'; import { getAllConfigDiff, getAppEnv } from '../../state/actions/Config'; import ConfigList from '../../components/ConfigList'; import ActionButtons from '../../components/ActionButtons'; const ConfigPage = () => { const { toggleNotification } = useNotification(); const { get } = getFetchClient(); const { formatMessage } = useIntl(); const dispatch = useDispatch(); const isLoading = useSelector((state) => state.getIn(['config', 'isLoading'], Map({}))); const configDiff = useSelector((state) => state.getIn(['config', 'configDiff'], Map({}))); const appEnv = useSelector((state) => state.getIn(['config', 'appEnv', 'env'])); useEffect(() => { dispatch(getAllConfigDiff(toggleNotification, formatMessage, get)); dispatch(getAppEnv(toggleNotification, formatMessage, get)); }, []); return ( {appEnv === 'production' && ( You're in the production environment
Please be careful when syncing your config in production.
Make sure you are not overriding critical config changes on import.
)}
); }; export default ConfigPage;