Skip to content
Snippets Groups Projects
Unverified Commit b86c495e authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins
Browse files

chore: rename util to environment.js file

parent af07e018
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +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 { isPreviewDeployment } from '../../util/preview';
import {
isDevelopmentEnvironment,
isPreviewEnvironment
} from '../../util/environment';
import { View, Text, Modal, Button, Tooltip, Menu } from '../common';
function getFileDescription(file) {
......@@ -320,8 +323,7 @@ class BudgetList extends React.Component {
Create new file
</Button>
{(process.env.NODE_ENV === 'development' ||
isPreviewDeployment()) && (
{(isDevelopmentEnvironment() || isPreviewEnvironment()) && (
<Button
primary
onClick={() => this.onCreate({ testMode: true })}
......
export function isPreviewDeployment() {
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