1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-30 23:20:06 +02:00

feat(cp-frontend): don't show env toggle when no variables set

This commit is contained in:
Sérgio Ramos 2017-08-22 14:34:57 +01:00
parent f38a0c5907
commit ccf1fd6f9a

View File

@ -358,18 +358,20 @@ export const Review = ({
<ImageTitle>Image:</ImageTitle> <Image>{config.image}</Image> <ImageTitle>Image:</ImageTitle> <Image>{config.image}</Image>
</dt> </dt>
</Dl> </Dl>
<ServiceDivider /> {config.environment && config.environment.length ? <ServiceDivider /> : null}
<ServiceEnvironmentTitle {config.environment && config.environment.length ?
expanded={environmentToggles[name]} <ServiceEnvironmentTitle
onClick={() => onEnvironmentToggle(name)} expanded={environmentToggles[name]}
> onClick={() => onEnvironmentToggle(name)}
Environment variables{' '} >
<EnvironmentChevron Environment variables{' '}
down={!environmentToggles[name]} <EnvironmentChevron
up={environmentToggles[name]} down={!environmentToggles[name]}
/> up={environmentToggles[name]}
</ServiceEnvironmentTitle> />
{environmentToggles[name] </ServiceEnvironmentTitle>
: null}
{config.environment && config.environment.length && environmentToggles[name]
? <EnvironmentReview environment={config.environment} /> ? <EnvironmentReview environment={config.environment} />
: null} : null}
</ServiceCard> </ServiceCard>