Switch the base framework from Create React App to Next.JS

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Renovate Bot 2021-12-25 15:44:24 +00:00 committed by Tilman Vatteroth
parent a979b6ffdd
commit 77a60c6c48
361 changed files with 5130 additions and 9605 deletions

View file

@ -4,18 +4,22 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
/**
* Checks if the current runtime is built in e2e test mode.
*/
export const isTestMode = (): boolean => {
return !!process.env.REACT_APP_TEST_MODE
return process.env.NEXT_PUBLIC_TEST_MODE === 'true'
}
/**
* Checks if the current runtime should use the mocked backend.
*/
export const isMockMode = (): boolean => {
return process.env.REACT_APP_BACKEND_BASE_URL === undefined
return process.env.NEXT_PUBLIC_USE_MOCK_API === 'true'
}
/**
* Checks if the current runtime was built in development mode.
*
* @return {@code true} if the runtime was built in development mode.
*/
export const isDevMode = (): boolean => {
return process.env.NODE_ENV === 'development'