async function listLeaderRequests() {
  const leaderRequests = [];
  const snapshot = await firestore
    .collection('leader_requests')
    .where('status', '==', 'pending')
    .orderBy('created_at', 'desc')
    .limit(20)
    .get();
  snapshot.forEach((doc) => {
    leaderRequests.push({ id: doc.id, ...doc.data() });
  });
  return leaderRequests;
}
/**
 * Functions to be used by the admin page in order to show data
 * and complete the process of assigning the leader role on protests
 **/
Functions to be used by the admin page in order to show data
and complete the process of assigning the leader role on protests
Functions to be used by the admin page in order to show data and complete the process of assigning the leader role on protests
async function listLeaderRequests() {
  const leaderRequests = [];
  const snapshot = await firestore
    .collection('leader_requests')
    .where('status', '==', 'pending')
    .orderBy('created_at', 'desc')
    .limit(20)
    .get();
  snapshot.forEach((doc) => {
    leaderRequests.push({ id: doc.id, ...doc.data() });
  });
  return leaderRequests;
}
async function listLeaderRequests ( ) { const leaderRequests = [ ] ; const snapshot = await firestore . collection ( 'leader_requests' ) . where ( 'status' , '==' , 'pending' ) . orderBy ( 'created_at' , 'desc' ) . limit ( 20 ) . get ( ) ; snapshot . forEach ( ( doc ) => { leaderRequests . push ( { id : doc . id , ... doc . data ( ) } ) ; } ) ; return leaderRequests ; }
Functions to be used by the admin page in order to show data
 and complete the process of assigning the leader role on protests
Functions to be used by the admin page in order to show data and complete the process of assigning the leader role on protests