-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #748 from hms-dbmi-cellenics/remove-ui-hardcodings
[BIOMAGE-1934] Remove account specific hardcodings in the UI code
- Loading branch information
Showing
8 changed files
with
33 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const getAWSRegion = () => { | ||
// only works in ssr, where process.env is available | ||
|
||
if (process.env.NODE_ENV === 'development') { | ||
return 'eu-west-1'; | ||
} | ||
|
||
const { AWS_REGION, AWS_DEFAULT_REGION } = process.env; | ||
|
||
if (!AWS_REGION && !AWS_DEFAULT_REGION) { | ||
throw new Error('AWS_REGION or DEFAULT_REGION must be set in the environment.'); | ||
} | ||
|
||
return AWS_REGION || AWS_DEFAULT_REGION; | ||
}; | ||
|
||
export default getAWSRegion; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters