Skip to content

Commit

Permalink
feat:make orderby timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovit-Mathew236 committed Sep 8, 2024
1 parent ffcf3f5 commit bcf8c65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/script/sih24.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { collection, getDocs, query } from "firebase/firestore";
import { collection, getDocs, query, orderBy } from "firebase/firestore";
import { DB } from "./login.js";
import { timeDifference } from "./main.js";

Expand Down Expand Up @@ -29,7 +29,7 @@ const firestoreName = "sih-hackathon-24";
*/
export const sihForm = async () => {
const FORMS = collection(DB, firestoreName);
const qry = query(FORMS); //, orderBy("UploadTimeStamp", "desc"));
const qry = query(FORMS, orderBy("UploadTimeStamp", "desc")); // or 'desc' for descending
const responcesTableBody = document.getElementById("responcesTableBody");

await callmeRightNow(qry, responcesTableBody);
Expand Down

0 comments on commit bcf8c65

Please sign in to comment.