From 5f4c9af8c71191ce2b93c838436c239fe181431a Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Thu, 21 Jul 2022 17:36:17 -0400
Subject: Display number of Peer Teachers at the top

---
 src/components/PeerTeachers/PeerTeachers.svelte | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src/components/PeerTeachers/PeerTeachers.svelte')

diff --git a/src/components/PeerTeachers/PeerTeachers.svelte b/src/components/PeerTeachers/PeerTeachers.svelte
index 713af26..7182f2f 100644
--- a/src/components/PeerTeachers/PeerTeachers.svelte
+++ b/src/components/PeerTeachers/PeerTeachers.svelte
@@ -25,7 +25,9 @@
     });
   }
 
-  const headers = ["", "First", "Last", "UIN", "Email", "Lab Hours", ""];
+  let headers = ["", "First", "Last", "UIN", "Email", "Lab Hours", ""];
+
+  $: console.log(headers);
 </script>
 
 <div class="overflow-auto h-full">
@@ -33,8 +35,8 @@
     <!-- head -->
     <thead>
       <tr>
-        {#each headers as header}
-          <th>{header}</th>
+        {#each headers as header, i}
+          <th> {i == 0 ? peerTeachers.length : header}</th>
         {/each}
       </tr>
     </thead>
-- 
cgit v1.2.3

