Skip to content

Instantly share code, notes, and snippets.

@m3l1nd4
Created May 19, 2021 05:24
Show Gist options
  • Save m3l1nd4/7faa7977c2488af3ccff4d70fdd7c8bc to your computer and use it in GitHub Desktop.
Save m3l1nd4/7faa7977c2488af3ccff4d70fdd7c8bc to your computer and use it in GitHub Desktop.
// 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