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';