From 044b7564fdf11044021ea3e7f6e3ac388744b31b Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Wed, 23 Feb 2022 18:45:22 -0800 Subject: [PATCH] Fix build --- web/lib/firebase/init.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/lib/firebase/init.ts b/web/lib/firebase/init.ts index 229ba1e3..da043ad7 100644 --- a/web/lib/firebase/init.ts +++ b/web/lib/firebase/init.ts @@ -1,6 +1,9 @@ import { getFirestore } from '@firebase/firestore' import { initializeApp, getApps, getApp } from 'firebase/app' +// Used to decide which Stripe instance to point to +export const isProd = process.env.NEXT_PUBLIC_FIREBASE_ENV !== 'DEV' + const FIREBASE_CONFIGS = { DEV: { apiKey: 'AIzaSyDp3J57vLeAZCzxLD-vcPaGIkAmBoGOSYw', @@ -30,7 +33,6 @@ const FIREBASE_CONFIGS = { measurementId: 'G-Y3EZ1WNT6E', }, } - const ENV = process.env.NEXT_PUBLIC_FIREBASE_ENV ?? 'PROD' // @ts-ignore const firebaseConfig = FIREBASE_CONFIGS[ENV]