From a8b3f5dcf70bd2191aa5511e643a760f87fa07ad Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 1 Feb 2021 10:59:56 -0600 Subject: [PATCH] use env for app name --- .env | 1 + public/index.html | 2 +- src/app/constants.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 0454adfc..60826396 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ +REACT_APP_NAME="Pybricks Code" REACT_APP_VERSION=$npm_package_version diff --git a/public/index.html b/public/index.html index d466af9b..1080111b 100644 --- a/public/index.html +++ b/public/index.html @@ -24,7 +24,7 @@ work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> - Pybricks Code + %REACT_APP_NAME% diff --git a/src/app/constants.ts b/src/app/constants.ts index 148891f3..62987140 100644 --- a/src/app/constants.ts +++ b/src/app/constants.ts @@ -7,7 +7,7 @@ export const tooltipDelay = 1000; /** Official name of the app. */ -export const appName = 'Pybricks Code'; +export const appName = process.env.REACT_APP_NAME || 'REACT_APP_NAME is undefined'; /** URL to main Pybricks website. */ export const pybricksWebsiteUrl = 'https://pybricks.com';