diff --git a/src/app/showcase/page.jsx b/src/app/showcase/page.jsx index b0a0c68..facdd47 100644 --- a/src/app/showcase/page.jsx +++ b/src/app/showcase/page.jsx @@ -1,9 +1,5 @@ -'use client' - -import { useEffect, useState } from 'react' import Image from 'next/image' import Link from 'next/link' -import { formatNumber } from '@/lib/common' import companies from './companies.json' import testimonials from '../../../utils/testimonials.json' @@ -30,44 +26,16 @@ const logoMap = { } export default function ShowcasePage() { - // Display the cached count if available; otherwise leave empty rather - // than show a stale fallback ("3500+" was years out of date). - const [githubStars, setGithubStars] = useState(null) - - useEffect(() => { - let cached = localStorage.getItem('githubStars') - if (cached) { - setGithubStars(formatNumber(Number(cached))) - return - } - // No cached value — fetch live so first-time visitors see a number. - fetch('https://api.github.com/repos/gofr-dev/gofr') - .then((r) => (r.ok ? r.json() : null)) - .then((d) => { - if (d?.watchers) { - setGithubStars(formatNumber(d.watchers)) - try { localStorage.setItem('githubStars', String(d.watchers)) } catch {} - } - }) - .catch(() => {}) - }, []) - return (
- {/* Hero */} + {/* Hero — star count is already shown live in the header, + so we don't repeat it here (the cached client-side number + could lag the header by hours). */}

Used by engineers around the world

- {githubStars && ( -
- - - - {githubStars} stars on GitHub -
- )}
{/* Company Grid */}