Skip to content

Commit 5ceb6b0

Browse files
committed
consolidate footer star and share into one section
1 parent fea2d6f commit 5ceb6b0

2 files changed

Lines changed: 22 additions & 21 deletions

File tree

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use client';
22

3+
import { Button } from '@/components/ui/button';
34
import { track } from '@/lib/analytics';
45
import { Star } from 'lucide-react';
56
import Link from 'next/link';
@@ -8,33 +9,30 @@ import { useGitHubStars } from '@/hooks/api/use-github-stars';
89

910
const GITHUB_REPO_URL = 'https://github.com/SemiAnalysisAI/InferenceX';
1011

11-
export function FooterStarCta() {
12+
export function FooterStarButton() {
1213
const { data } = useGitHubStars();
1314
const stars = data?.stars ?? null;
1415

1516
return (
16-
<div
17+
<Button
18+
variant="outline"
19+
size="sm"
20+
className="h-7 gap-1.5 text-xs"
21+
asChild
1722
data-testid="footer-star-cta"
18-
className="flex flex-col items-center gap-3 mb-6 pb-6 border-b border-border/40"
1923
>
20-
<p className="text-sm text-muted-foreground text-center max-w-md">
21-
InferenceX is open source. If this data helps your work, a star on GitHub goes a long way.
22-
</p>
2324
<Link
2425
href={GITHUB_REPO_URL}
2526
target="_blank"
2627
rel="noopener noreferrer"
27-
className="group flex items-center gap-2 px-4 py-2 rounded-md border border-gray-300 dark:border-gray-600 hover:border-primary/50 dark:hover:border-primary/50 hover:bg-primary/5 dark:hover:bg-primary/10 transition-all"
2828
onClick={() => track('footer_star_cta_clicked', { stars: stars ?? 0 })}
2929
>
30-
<Star className="h-4 w-4 text-yellow-500 fill-yellow-500 group-hover:scale-110 transition-transform" />
31-
<span className="text-sm font-medium">Star on GitHub</span>
30+
<Star className="h-3.5 w-3.5 text-yellow-500 fill-yellow-500" />
31+
<span>Star</span>
3232
{stars !== null && (
33-
<span className="text-xs font-semibold text-muted-foreground ml-1">
34-
{stars.toLocaleString()}
35-
</span>
33+
<span className="font-semibold text-muted-foreground">{stars.toLocaleString()}</span>
3634
)}
3735
</Link>
38-
</div>
36+
</Button>
3937
);
4038
}

packages/app/src/components/footer/footer.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Link from 'next/link';
44
import { SocialShareButtons } from '@/components/social-share-buttons';
55
import { cn } from '@/lib/utils';
66

7-
import { FooterStarCta } from './footer-star-cta';
7+
import { FooterStarButton } from './footer-star-cta';
88

99
export const Footer = () => {
1010
return (
@@ -30,13 +30,16 @@ export const Footer = () => {
3030
)}
3131
>
3232
<div className="container mx-auto py-8 px-4 flex flex-col items-center justify-center">
33-
{/* GitHub Star CTA */}
34-
<FooterStarCta />
35-
36-
{/* Social Share */}
37-
<div className="flex flex-col items-center gap-2 mb-6 pb-6 border-b border-border/40">
38-
<p className="text-xs text-muted-foreground">Share InferenceX with your network</p>
39-
<SocialShareButtons compact />
33+
{/* Open Source CTA */}
34+
<div className="flex flex-col items-center gap-3 mb-6 pb-6 border-b border-border/40">
35+
<p className="text-sm text-muted-foreground text-center max-w-md">
36+
InferenceX is open source. If this data helps your work, star us or share with your
37+
network.
38+
</p>
39+
<div className="flex items-center gap-1.5">
40+
<FooterStarButton />
41+
<SocialShareButtons compact />
42+
</div>
4043
</div>
4144

4245
{/* Policy Links */}

0 commit comments

Comments
 (0)