-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d00d140
commit 569f572
Showing
18 changed files
with
1,328 additions
and
1,559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,7 @@ yarn-error.log* | |
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
// Import the functions you need from the SDKs you need | ||
//import { initializeApp } from "firebase/app"; | ||
import { initializeApp, getApps, getApp } from "firebase/app"; | ||
import { initializeApp, getApp, getApps } from "firebase/app"; | ||
import { getAuth } from "firebase/auth"; | ||
import { getFirestore } from "firebase/firestore"; | ||
import { getStorage } from "firebase/storage"; | ||
// TODO: Add SDKs for Firebase products that you want to use | ||
// https://firebase.google.com/docs/web/setup#available-libraries | ||
|
||
// Your web app's Firebase configuration | ||
// For Firebase JS SDK v7.20.0 and later, measurementId is optional | ||
const firebaseConfig = { | ||
apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY, | ||
authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN, | ||
projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID, | ||
storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET, | ||
messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID, | ||
appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID, | ||
apiKey: "AIzaSyARXDiYjznCzi26fvt00cEXDp-88f6zNTc", | ||
authDomain: "messenger-mern-clone-dca82.firebaseapp.com", | ||
projectId: "messenger-mern-clone-dca82", | ||
storageBucket: "messenger-mern-clone-dca82.appspot.com", | ||
messagingSenderId: "468616337977", | ||
appId: "1:468616337977:web:1e80cf727273ca38288be8", | ||
measurementId: "G-R8YCSSJ33J", | ||
}; | ||
// Initialize Firebase | ||
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp(); | ||
const db = getFirestore(); | ||
const storage = getStorage(); | ||
const firestore = getFirestore(app); | ||
const auth = getAuth(app); | ||
const storage = getStorage(app); | ||
|
||
export { app, storage }; | ||
export default db; | ||
// export | ||
export { app, auth, firestore, storage }; |
Oops, something went wrong.