Skip to content

Commit

Permalink
update security
Browse files Browse the repository at this point in the history
  • Loading branch information
im-abdulmannan committed Aug 2, 2024
1 parent bfbb635 commit 59c35ab
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ yarn-error.log*

# local env files
.env*.local
.env

# vercel
.vercel
Expand Down
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^5.16.5",
"@mui/material": "^5.16.5",
"dotenv": "^16.4.5",
"firebase": "^10.12.4",
"next": "14.2.5",
"react": "^18",
Expand Down
2 changes: 0 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@ export default function Home() {
const fetchCollection = async () => {
try {
const querySnapShot = await getDocs(collection(db, "pantry"));
console.log("🚀 ~ fetchCollection ~ querySnapShot:", querySnapShot);
const data: any = querySnapShot.docs.map((doc) => ({
name: doc.id,
...doc.data(),
}));
console.log("🚀 ~ fetchCollection ~ data:", data);
setPantryData(data);
} catch (error) {
console.log("Error fetching collection: ", error);
Expand Down
14 changes: 7 additions & 7 deletions src/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { initializeApp } from "firebase/app";
import { getFirestore } from "firebase/firestore";

const firebaseConfig = {
apiKey: "AIzaSyD-XoJuJ8NjN3EUSwHO6KdmKw6ShJySeUg",
authDomain: "pantry-track.firebaseapp.com",
projectId: "pantry-track",
storageBucket: "pantry-track.appspot.com",
messagingSenderId: "894667218839",
appId: "1:894667218839:web:0778a13db8acc33df2eed2",
measurementId: "G-007BN9XB9M",
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_MESSAGE_SENDER_ID,
appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID,
measurementId: process.env.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID,
};

// Initialize Firebase
Expand Down

0 comments on commit 59c35ab

Please sign in to comment.