File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 629629< div id ="app ">
630630
631631 < nav >
632- < a href ="# " class ="nav-logo "> ⬡ Algorithm < span > Vault </ span > </ a >
632+ < a href ="# " class ="nav-logo "> Vault < span > Blogs </ span > </ a >
633633 < div class ="nav-links ">
634634 < div id ="auth-area "> </ div >
635635 < button class ="btn btn-primary " id ="write-btn " style ="display:none " onclick ="openWriteModal() ">
@@ -658,8 +658,8 @@ <h1 class="hero-title">
658658 < div class ="stat-label "> Total Reads</ div >
659659 </ div >
660660 < div class ="stat ">
661- < div class ="stat-num "> O(1) </ div >
662- < div class ="stat-label "> Lookup Time (aspirational) </ div >
661+ < div class ="stat-num " id =" stat-users " > — </ div >
662+ < div class ="stat-label "> Users </ div >
663663 </ div >
664664 </ div >
665665 </ section >
@@ -927,7 +927,20 @@ <h2 class="feed-title">Latest Articles</h2>
927927
928928 return publicUrl . publicUrl ;
929929}
930+ async function updateUserCount ( ) {
931+ const { count, error } = await db
932+
933+ . from ( 'profiles' )
934+ . select ( '*' , { count : 'exact' , head : true } ) ;
930935
936+ if ( error ) {
937+ console . error ( error ) ;
938+ return ;
939+ }
940+ const fakeBoost = 33 ; // your fake users
941+
942+ document . getElementById ( 'stat-users' ) . textContent = count + fakeBoost ;
943+ }
931944/* ── POSTS ── */
932945async function fetchPosts ( ) {
933946 showLoading ( ) ;
@@ -1536,6 +1549,7 @@ <h2 class="feed-title">Latest Articles</h2>
15361549}
15371550
15381551initAuth ( ) ;
1552+ updateUserCount ( ) ;
15391553</ script >
15401554</ body >
15411555</ html >
You can’t perform that action at this time.
0 commit comments