Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
b86c495e
Unverified
Commit
b86c495e
authored
2 years ago
by
Matiss Janis Aboltins
Browse files
Options
Downloads
Patches
Plain Diff
chore: rename util to environment.js file
parent
af07e018
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/loot-design/src/components/manager/BudgetList.js
+5
-3
5 additions, 3 deletions
packages/loot-design/src/components/manager/BudgetList.js
packages/loot-design/src/util/environment.js
+7
-0
7 additions, 0 deletions
packages/loot-design/src/util/environment.js
with
12 additions
and
3 deletions
packages/loot-design/src/components/manager/BudgetList.js
+
5
−
3
View file @
b86c495e
...
...
@@ -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
})}
...
...
This diff is collapsed.
Click to expand it.
packages/loot-design/src/util/
preview
.js
→
packages/loot-design/src/util/
environment
.js
+
7
−
0
View file @
b86c495e
export
function
isPreview
Deploy
ment
()
{
export
function
isPreview
Environ
ment
()
{
return
String
(
process
.
env
.
REACT_APP_NETLIFY
)
===
'
true
'
;
}
export
function
isDevelopmentEnvironment
()
{
return
process
.
env
.
NODE_ENV
===
'
development
'
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment