From ac9317357704f9d7fd838de70eff13fc7cfd51af Mon Sep 17 00:00:00 2001 From: Andre Thomas Date: Fri, 21 Oct 2022 13:45:25 -0400 Subject: [PATCH] Update add program button conditional logic. --- js/pages/tola_management_pages/program/views.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/pages/tola_management_pages/program/views.js b/js/pages/tola_management_pages/program/views.js index e38447236..79fb0ea52 100644 --- a/js/pages/tola_management_pages/program/views.js +++ b/js/pages/tola_management_pages/program/views.js @@ -209,7 +209,7 @@ export const IndexView = observer(
- {window.location.href.toLowerCase().includes('demo') || window.location.href.toLowerCase().includes('dev') || window.location.href.toLowerCase().includes('localhost') && + {["demo", "dev", "local"].reduce((editable, env) => { if(!editable) return editable = window.location.href.includes(env) }, false) &&
store.createProgram()}> {gettext("Add Program")}