"use client"; import { ReactElement, useEffect, useState } from "react"; import { Star } from "lucide-react"; import Link from "next/link"; import { cn } from "@/app/common/utils"; type GithubStarProps = { /** * The class name for this component. */ className?: string; }; export function GithubStar({ className }: GithubStarProps): ReactElement { const [starCount, setStarCount] = useState(0); const getStarCount = async () => { const res = await fetch("https://api.github.com/repos/RealFascinated/MinecraftUtilities"); const data = await res.json(); return data.stargazers_count; }; useEffect(() => { getStarCount().then(setStarCount); }, []); return (

{starCount}

Star us!

); }