Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 31 additions & 17 deletions src/pages/OverviewPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import SocialShareButton from '../components/SocialShareButton';
import { AiOutlineInfoCircle } from "react-icons/ai";
import AnalysisBanner from '../components/AnalysisBanner'
import { OverviewSkeleton } from '../components/Orgexplorerskeletons'
import {formatNumber} from '../utils/formatNumber'
import { formatNumber } from '../utils/formatNumber'

const LANG_COLORS = ['#22c55e', '#f5c518', '#3b82f6', '#ef4444', '#a855f7', '#f97316', '#06b6d4']
const fmt = n => n > 999 ? (n / 1000).toFixed(1) + 'k' : String(n)
Expand All @@ -30,7 +30,7 @@ export default function OverviewPage() {
}
}, [])

if(loading) return <OverviewSkeleton />
if (loading) return <OverviewSkeleton />
if (!model) return null

const { totalRepos } = model
Expand All @@ -48,16 +48,30 @@ export default function OverviewPage() {

const NavCard = ({ to, label, sub }) => (
<div
onClick={() => navigate(to)}
onMouseEnter={e => e.currentTarget.style.borderColor = 'var(--accent)'}
onMouseLeave={e => e.currentTarget.style.borderColor = 'var(--border)'}
style={{ ...C.card, cursor: 'pointer', transition: 'border-color .2s' }}
>
<div style={{ fontWeight: 600, marginBottom: 4, fontSize: 14 }}>{label}</div>
<div style={{ fontSize: 12, color: 'var(--text2)', marginBottom: 12, minHeight: 32 }}>{sub}</div>
<span style={{ fontSize: 12, color: 'var(--accent)', fontWeight: 600, display: 'flex', alignItems: 'center', gap: 4 }}>
View {label} <FiArrowRight size={12} />
</span>
onMouseEnter={e => {
e.currentTarget.style.borderColor = 'var(--accent)'
}}
onMouseLeave={e => {
e.currentTarget.style.borderColor = 'var(--border)'
}}
style={{...C.card,transition: 'border-color .2s' }} >
<div
style={{ fontWeight: 600,marginBottom: 4, fontSize: 14 }} >
{label}
</div>

<div
style={{fontSize: 12, color: 'var(--text2)', marginBottom: 12, minHeight: 32 }}>
{sub}
</div>

<button
type="button"
onClick={() => navigate(to)}
style={{ ...C.btn('primary'), display: 'flex', alignItems: 'center', gap: 6, fontSize: 12 }}>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
View {label}
<FiArrowRight size={12} />
</button>
</div>
)

Expand Down Expand Up @@ -103,9 +117,9 @@ export default function OverviewPage() {
<FiExternalLink size={13} /> View on GitHub
</a>
)}
<SocialShareButton
theme="dark"
buttonStyle="ghost"
<SocialShareButton
theme="dark"
buttonStyle="ghost"
title={isMulti ? `OrgExplorer: ${orgs.map(o => o.login).join(' + ')}` : `OrgExplorer: ${orgs[0]?.name || orgs[0]?.login}`}
description={isMulti ? `${orgs.length} organizations — combined portfolio view` : (orgs[0]?.description || `@${orgs[0]?.login}`)}
/>
Expand Down Expand Up @@ -150,8 +164,8 @@ export default function OverviewPage() {
<p>High Impact Repositories</p>

<button
onMouseEnter={()=>setOpen(true)}
onMouseLeave={()=>setOpen(false)}
onMouseEnter={() => setOpen(true)}
onMouseLeave={() => setOpen(false)}
className="p-3 rounded-full hover:bg-(--bg) transition"
>
<AiOutlineInfoCircle className="text-(--text) cursor-pointer" />
Expand Down
Loading