Remove REACT_APP_MANDATE_LOGIN

This commit is contained in:
zkldi
2021-10-27 22:37:38 +01:00
parent 26df3448d2
commit 8fdbe53dee
2 changed files with 3 additions and 4 deletions
-1
View File
@@ -20,6 +20,5 @@ pnpm start
# .env
REACT_APP_TCHIC_MODE="omni" # "btchi" or "ktchi", in prod
REACT_APP_API_URL="wherever the related tachi-server is hosted."
# REACT_APP_MANDATE_LOGIN="true" # Whether to mandate logins or not. This should be "true" for ktchi, and false for btchi.
```
+3 -3
View File
@@ -3,7 +3,7 @@ import { StaticConfig } from "tachi-common";
export const mode = process.env.REACT_APP_TCHIC_MODE;
if (!mode) {
throw new Error("No TCHIC_MODE set. Cannot boot.");
throw new Error("No REACT_APP_TCHIC_MODE set in Process Environment, refusing to boot.");
}
let conf;
@@ -25,11 +25,11 @@ if (mode === "ktchi") {
primary: "#e61c6e",
};
} else {
throw new Error(`Invalid TCHIC_MODE of ${mode}. Cannot boot.`);
throw new Error("Invalid REACT_APP_TCHIC_MODE. Expected ktchi, btchi or omni.");
}
export const TachiConfig = conf;
export const ColourConfig = colourConf;
export const ClientConfig = {
MANDATE_LOGIN: !!process.env.REACT_APP_MANDATE_LOGIN,
MANDATE_LOGIN: process.env.REACT_APP_TCHIC_MODE === "ktchi",
};