text: import config from "./config";
  import firebase from "firebase";
  import "firebase/auth";
  import "firebase/firestore";
  
  const firebaseConfig = {
    apiKey: config.API_KEY,
    authDomain: config.AUTH_DOMAIN,
    projectId: config.PROJECT_ID,
    storageBucket: config.STORAGE_BUCKET,
    messagingSenderId: config.MESSAGING_SENDER_ID,
    appId: config.APP_ID,
  };
  
  let app;
  
  if (firebase.apps.length === 0) {
    app = firebase.initializeApp(firebaseConfig);
  } else {
    app = firebase.app();
  }
  
  const db = firebase.firestore();
  const auth = firebase.auth();
  
  export { db, auth };
  