Skip to content

Commit

Permalink
Merge pull request #63 from AndyOooh/ED1-45-feature-event.card-show_a…
Browse files Browse the repository at this point in the history
…ddress

remove window object in clientApp
  • Loading branch information
AndyOooh authored Jan 14, 2024
2 parents 561ac3c + 937562c commit 1fdf67e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/app/src/firebase/clientApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import { connectFirestoreEmulator, getFirestore } from 'firebase/firestore';
import { connectStorageEmulator, getStorage } from 'firebase/storage';
import { connectFunctionsEmulator, getFunctions, httpsCallable } from 'firebase/functions';

/*
* Do NOT use window object or other browser specific objects here
* server components may use this file and buld will fail
*/

const firebaseConfig: FirebaseOptions = {
apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
authDomain: 'event-dee-staging.firebaseapp.com',
Expand All @@ -36,7 +41,7 @@ const getCloudFunction = (functionName: string) => {
return returnedFunction;
};

if (process.env.NODE_ENV.match(/development/i) || window.location.hostname === 'localhost') {
if (process.env.NODE_ENV === 'development' || process.env.NEXT_PUBLIC_EMULATORS_ON === 'true') {
connectAuthEmulator(auth, 'http://localhost:9099');
connectFirestoreEmulator(db, 'localhost', 8080);
connectStorageEmulator(storage, 'localhost', 9199);
Expand Down

1 comment on commit 1fdf67e

@vercel
Copy link

@vercel vercel bot commented on 1fdf67e Jan 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dev-event-dee2 – ./apps/app

dev-event-dee2.vercel.app
dev-event-dee2-andyoooh.vercel.app
dev-event-dee2-git-main-andyoooh.vercel.app

Please sign in to comment.