MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / LiveClient

Function LiveClient

freebuff/web/src/app/live/live-client.tsx:522–597  ·  view source on GitHub ↗
({
  initialStats,
}: {
  initialStats: FreebuffLiveStats
})

Source from the content-addressed store, hash-verified

520}
521
522export default function LiveClient({
523 initialStats,
524}: {
525 initialStats: FreebuffLiveStats
526}) {
527 const [hasMounted, setHasMounted] = useState(false)
528 const stats = useLiveStats(initialStats)
529
530 useEffect(() => {
531 setHasMounted(true)
532 }, [])
533
534 return (
535 <main className="min-h-screen bg-black text-white">
536 <section className="relative overflow-hidden border-b border-white/10">
537 <div className="absolute inset-0 bg-[linear-gradient(rgba(124,255,63,0.06)_1px,transparent_1px),linear-gradient(90deg,rgba(34,211,238,0.05)_1px,transparent_1px)] bg-[size:56px_56px]" />
538 <div className="relative container mx-auto px-4 pb-6 pt-10 md:pb-8 md:pt-14">
539 <div className="flex flex-col gap-8 lg:flex-row lg:items-end lg:justify-between">
540 <div className="max-w-4xl">
541 <div className="flex flex-wrap items-baseline gap-x-4 gap-y-2">
542 <h1 className="relative max-w-3xl pl-7 font-serif text-4xl leading-tight text-white md:pl-8 md:text-6xl">
543 <span
544 aria-hidden
545 className="absolute left-0 top-[0.43em] h-3 w-3 -translate-y-1/2 md:h-4 md:w-4"
546 >
547 <motion.span
548 className="block h-full w-full rounded-full bg-acid-matrix shadow-[0_0_18px_rgba(124,255,63,0.9)]"
549 animate={{
550 opacity: [0.45, 1, 0.45],
551 scale: [0.86, 1.18, 0.86],
552 }}
553 transition={{
554 duration: 1.8,
555 repeat: Infinity,
556 ease: 'easeInOut',
557 }}
558 />
559 </span>
560 Freebuff live
561 </h1>
562 {hasMounted && (
563 <span className="whitespace-nowrap text-sm text-white/45 md:text-base">
564 Updated {formattedTime(stats.generatedAt)}
565 </span>
566 )}
567 </div>
568 <p className="mt-4 max-w-2xl text-base leading-7 text-white/54 md:text-lg">
569 Real-time Freebuff sessions across every country.
570 </p>
571 </div>
572
573 <LiveUsersHero value={stats.totalLiveUsers} />
574 </div>
575 </div>
576 </section>
577
578 <section className="container mx-auto px-4 pb-8 pt-5 md:pb-10 md:pt-6">
579 <div className="grid gap-6 xl:grid-cols-[minmax(0,1.85fr)_minmax(330px,0.78fr)]">

Callers

nothing calls this directly

Calls 2

useLiveStatsFunction · 0.90
formattedTimeFunction · 0.85

Tested by

no test coverage detected