Created
May 19, 2021 05:24
-
-
Save magyarmelinda/7faa7977c2488af3ccff4d70fdd7c8bc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Setting Up The Thread Details | |
const setUpThreadDetails = (id) => { | |
db.collection('threads') | |
.where(firebase.firestore.FieldPath.documentId(), "==", id) | |
.get() | |
.then((snapshot) => { | |
snapshot.docs.forEach((doc) => { | |
const thread = doc.data(); | |
document.getElementById("thread-title").innerText = thread.title; | |
document.getElementById("thread-description").innerText = thread.description; | |
displayImage('threads/', doc.id, 'thread-img', true); | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment