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