@@ -3,14 +3,15 @@ import { useNavigate } from 'react-router-dom'
33import { FiExternalLink , FiShare2 , FiArrowRight } from 'react-icons/fi'
44import { useApp } from '../context/AppContext'
55import { C , StatCard , HealthBar } from '../components/UI'
6- import { BsFillInfoSquareFill } from "react-icons/bs" ;
76import SocialShareButton from '../components/SocialShareButton' ;
7+ import { AiOutlineInfoCircle } from "react-icons/ai" ;
8+
89
910const LANG_COLORS = [ '#22c55e' , '#f5c518' , '#3b82f6' , '#ef4444' , '#a855f7' , '#f97316' , '#06b6d4' ]
1011const fmt = n => n > 999 ? ( n / 1000 ) . toFixed ( 1 ) + 'k' : String ( n )
1112
1213export default function OverviewPage ( ) {
13- const { orgs, model } = useApp ( )
14+ const { orgs, model, totalRepo } = useApp ( )
1415 const navigate = useNavigate ( )
1516 const [ open , setOpen ] = useState ( false )
1617 const infoRef = useRef ( null )
@@ -71,7 +72,7 @@ export default function OverviewPage() {
7172 </ div >
7273 ) : (
7374 orgs [ 0 ] ?. avatar_url && (
74- < img src = { orgs [ 0 ] . avatar_url } alt = "" style = { { width : 56 , height : 56 , borderRadius : '50%' , border : '2px solid var(--border)' } } />
75+ < img src = { orgs [ 0 ] . avatar_url } alt = "" style = { { width : 56 , height : 56 } } />
7576 )
7677 ) }
7778 < div style = { { flex : 1 } } >
@@ -102,10 +103,10 @@ export default function OverviewPage() {
102103
103104 { /* Stats */ }
104105 < div style = { { display : 'grid' , gridTemplateColumns : 'repeat(4,1fr)' , gap : 12 , marginBottom : 24 } } >
105- < StatCard label = "Total Repos" value = { allRepos . length . toLocaleString ( ) } />
106+ < StatCard label = "Total Repos" value = { totalRepo . toLocaleString ( ) } />
106107 < StatCard label = "Total Stars" value = { fmt ( totalStars ) } />
107108 < StatCard label = "Total Forks" value = { fmt ( totalForks ) } />
108- < StatCard label = "Active Repos" value = { activeRepos } sub = { `${ Math . round ( activeRepos / allRepos . length * 100 ) } % of total` } />
109+ < StatCard label = "Active Repos" value = { activeRepos } sub = { `${ Math . round ( activeRepos / totalRepo * 100 ) } % of total` } />
109110 </ div >
110111
111112 { /* Language + top repos */ }
@@ -138,16 +139,17 @@ export default function OverviewPage() {
138139 < p > High Impact Repositories</ p >
139140
140141 < button
141- onClick = { ( ) => setOpen ( prev => ! prev ) }
142- className = "p-3 rounded-full hover:bg-zinc-800 transition"
142+ onMouseEnter = { ( ) => setOpen ( true ) }
143+ onMouseLeave = { ( ) => setOpen ( false ) }
144+ className = "p-3 rounded-full hover:bg-(--bg) transition"
143145 >
144- < BsFillInfoSquareFill />
146+ < AiOutlineInfoCircle className = "text-(--text) cursor-pointer" />
145147 </ button >
146148 </ div >
147149
148150 { open && (
149151 < div
150- className = "absolute top-16 right-2 w-80 z-50 rounded-lg border-2 border-(--border) bg-zinc-900 p-4 shadow-xl text-xs"
152+ className = "absolute top-16 right-2 w-80 z-50 rounded-lg border-2 border-(--border) bg-(--surface) p-4 shadow-xl text-xs"
151153 >
152154 < strong > Health Score</ strong > estimates the overall health of a repository on a scale of 0 – 100.
153155
@@ -163,7 +165,7 @@ export default function OverviewPage() {
163165 </ li >
164166 </ ul >
165167
166- < p className = "mt-2 text-zinc-400 " >
168+ < p className = "mt-2 text-xs text-(--text2) " >
167169 Higher scores indicate healthier and more actively maintained repositories.
168170 </ p >
169171 </ div >
0 commit comments