fix: render editor tabs if SHOW_UPCOMING_CHANGES is 'true' (#39513)
parent
06da30e48a
commit
9b1077acf5
|
@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|||
import { first } from 'lodash';
|
||||
import EditorTabs from './EditorTabs';
|
||||
import ActionRow from './ActionRow';
|
||||
import { showUpcomingChanges } from '../../../../config/env.json';
|
||||
|
||||
const propTypes = {
|
||||
challengeFiles: PropTypes.object,
|
||||
|
@ -43,9 +44,10 @@ class DesktopLayout extends Component {
|
|||
} = this.props;
|
||||
|
||||
const challengeFile = this.getChallengeFile();
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
{hasEditableBoundries && <ActionRow />}
|
||||
{showUpcomingChanges && hasEditableBoundries && <ActionRow />}
|
||||
<ReflexContainer className='desktop-layout' orientation='vertical'>
|
||||
<ReflexElement flex={1} {...resizeProps}>
|
||||
{instructions}
|
||||
|
@ -57,7 +59,9 @@ class DesktopLayout extends Component {
|
|||
<ReflexElement flex={1} {...reflexProps} {...resizeProps}>
|
||||
{
|
||||
<Fragment>
|
||||
{!hasEditableBoundries && <EditorTabs />}
|
||||
{showUpcomingChanges && !hasEditableBoundries && (
|
||||
<EditorTabs />
|
||||
)}
|
||||
{editor}
|
||||
</Fragment>
|
||||
}
|
||||
|
|
|
@ -19,7 +19,8 @@ const {
|
|||
ALGOLIA_APP_ID: algoliaAppId,
|
||||
ALGOLIA_API_KEY: algoliaAPIKey,
|
||||
PAYPAL_CLIENT_ID: paypalClientId,
|
||||
DEPLOYMENT_ENV: deploymentEnv
|
||||
DEPLOYMENT_ENV: deploymentEnv,
|
||||
SHOW_UPCOMING_CHANGES: showUpcomingChanges
|
||||
} = process.env;
|
||||
|
||||
const locations = {
|
||||
|
@ -48,5 +49,6 @@ module.exports = Object.assign(locations, {
|
|||
paypalClientId:
|
||||
!paypalClientId || paypalClientId === 'id_from_paypal_dashboard'
|
||||
? null
|
||||
: paypalClientId
|
||||
: paypalClientId,
|
||||
showUpcomingChanges: showUpcomingChanges === 'true'
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue