Skip to content
Snippets Groups Projects
Unverified Commit 1816e914 authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

Merge pull request #413 from MatissJanis/matiss/netlify-demo

feat: allow creating test budget in netlify deployments
parents b8453f07 b86c495e
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,10 @@ import CloudDownload from '../../svg/v1/CloudDownload';
import DotsHorizontalTriple from '../../svg/v1/DotsHorizontalTriple';
import FileDouble from '../../svg/v1/FileDouble';
import CloudUnknown from '../../svg/v2/CloudUnknown';
import {
isDevelopmentEnvironment,
isPreviewEnvironment
} from '../../util/environment';
import { View, Text, Modal, Button, Tooltip, Menu } from '../common';
function getFileDescription(file) {
......@@ -319,7 +323,7 @@ class BudgetList extends React.Component {
Create new file
</Button>
{process.env.NODE_ENV === 'development' && (
{(isDevelopmentEnvironment() || isPreviewEnvironment()) && (
<Button
primary
onClick={() => this.onCreate({ testMode: true })}
......
export function isPreviewEnvironment() {
return String(process.env.REACT_APP_NETLIFY) === 'true';
}
export function isDevelopmentEnvironment() {
return process.env.NODE_ENV === 'development';
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment