From 1bef4e1086aed7278fd86af8576fdd52414fc04f Mon Sep 17 00:00:00 2001 From: Sarah Lessner Date: Thu, 19 Dec 2024 13:54:10 -0700 Subject: [PATCH] variable change logic for node env --- apps/jira/jira-app/src/constants.ts | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/apps/jira/jira-app/src/constants.ts b/apps/jira/jira-app/src/constants.ts index 4c195e18e7..6f264284e0 100644 --- a/apps/jira/jira-app/src/constants.ts +++ b/apps/jira/jira-app/src/constants.ts @@ -1,30 +1,11 @@ let LAMBDA_URI = 'https://api.jira.ctfapps.net'; let CLIENT_ID = 'XD9k9QU9VT4Rt26u6lbO3NM0fOqvvXan'; -if (import.meta.env.DEV) { - console.log('Running in development mode'); +if (process.env.NODE_ENV === 'development') { LAMBDA_URI = `${import.meta.env.VITE_NGROK_URL}/test`; CLIENT_ID = import.meta.env.VITE_ATLASSIAN_APP_CLIENT_ID || ''; } -// interface ImportMetaValue extends ImportMeta { -// NODE_ENV?: string; -// VITE_NGROK_URL?: string; -// VITE_ATLASSIAN_APP_CLIENT_ID?: string; -// } - -// if ((import.meta as ImportMetaValue).NODE_ENV === 'development') { -// console.log('development'); -// LAMBDA_URI = `${(import.meta as ImportMetaValue).VITE_NGROK_URL}/test`; -// CLIENT_ID = (import.meta as ImportMetaValue).VITE_ATLASSIAN_APP_CLIENT_ID || ''; -// } - -// if (process.env.NODE_ENV === 'development') { -// console.log('development'); -// LAMBDA_URI = `${process.env.REACT_APP_NGROK_URL}/test`; -// CLIENT_ID = process.env.REACT_APP_ATLASSIAN_APP_CLIENT_ID || ''; -// } - const constants = { OAUTH_REDIRECT_URI: `${LAMBDA_URI}/auth`, CONNECT_URL: `${LAMBDA_URI}/connect.json`,