Added logging and preview options to .env

This commit is contained in:
Mitchell McCaffrey 2020-12-03 12:29:33 +11:00
parent 0a1c22b06f
commit 5ae6f0bc1b
5 changed files with 21 additions and 21 deletions

4
.env
View File

@ -2,4 +2,6 @@ REACT_APP_BROKER_URL=http://localhost:9000
REACT_APP_ICE_SERVERS_URL=http://localhost:9000/iceservers REACT_APP_ICE_SERVERS_URL=http://localhost:9000/iceservers
REACT_APP_STRIPE_API_KEY=pk_test_8M3NHrF1eI2b84ubF4F8rSTe0095R3f0My REACT_APP_STRIPE_API_KEY=pk_test_8M3NHrF1eI2b84ubF4F8rSTe0095R3f0My
REACT_APP_STRIPE_URL=http://localhost:9000 REACT_APP_STRIPE_URL=http://localhost:9000
REACT_APP_VERSION=$npm_package_version REACT_APP_VERSION=$npm_package_version
REACT_APP_PREVIEW=false
REACT_APP_LOGGING=false

View File

@ -1,5 +0,0 @@
REACT_APP_BROKER_URL=https://test.owlbear.rodeo
REACT_APP_ICE_SERVERS_URL=https://test.owlbear.rodeo/iceservers
REACT_APP_STRIPE_API_KEY=pk_live_MJjzi5djj524Y7h3fL5PNh4e00a852XD51
REACT_APP_STRIPE_URL=https://payment.owlbear.rodeo
REACT_APP_VERSION=$npm_package_version

View File

@ -2,4 +2,6 @@ REACT_APP_BROKER_URL=https://test.owlbear.rodeo
REACT_APP_ICE_SERVERS_URL=https://test.owlbear.rodeo/iceservers REACT_APP_ICE_SERVERS_URL=https://test.owlbear.rodeo/iceservers
REACT_APP_STRIPE_API_KEY=pk_live_MJjzi5djj524Y7h3fL5PNh4e00a852XD51 REACT_APP_STRIPE_API_KEY=pk_live_MJjzi5djj524Y7h3fL5PNh4e00a852XD51
REACT_APP_STRIPE_URL=https://payment.owlbear.rodeo REACT_APP_STRIPE_URL=https://payment.owlbear.rodeo
REACT_APP_VERSION=$npm_package_version REACT_APP_VERSION=$npm_package_version
REACT_APP_PREVIEW=true
REACT_APP_LOGGING=false

View File

@ -2,7 +2,7 @@ import { captureException } from "@sentry/react";
export function logError(error) { export function logError(error) {
console.error(error); console.error(error);
// if (process.env.NODE_ENV === "production") { if (process.env.REACT_APP_LOGGING === "true") {
// captureException(error); captureException(error);
// } }
} }

View File

@ -11,17 +11,18 @@ import * as serviceWorker from "./serviceWorker";
import "./index.css"; import "./index.css";
console.log(process.env.NODE_ENV); if (process.env.REACT_APP_LOGGING === "true") {
Sentry.init({
// if (process.env.NODE_ENV === "production") { dsn:
// Sentry.init({ "https://bc1e2edfe7ca453f8e7357a48693979e@o467475.ingest.sentry.io/5493956",
// dsn: release: "owlbear-rodeo@" + process.env.REACT_APP_VERSION,
// "https://bc1e2edfe7ca453f8e7357a48693979e@o467475.ingest.sentry.io/5493956", // Ignore resize error as it is triggered by going fullscreen on slower computers
// release: "owlbear-rodeo@" + process.env.REACT_APP_VERSION, ignoreErrors: [
// // Ignore resize error as it is triggered by going fullscreen on slower computers "ResizeObserver loop limit exceeded",
// ignoreErrors: ["ResizeObserver loop limit exceeded", "AbortError: QuotaExceededError"], "AbortError: QuotaExceededError",
// }); ],
// } });
}
Modal.setAppElement("#root"); Modal.setAppElement("#root");