"use client"; import { Github, Menu, Star, X } from "lucide-react"; import { useEffect, useState } from "react"; function formatStarCount(count: number): string { if (count >= 1000) { const k = count / 1000; return `${k % 1 === 0 ? k.toFixed(0) : k.toFixed(1)}k`; } return count.toString(); } const links = [ { label: "Features", href: "#features" }, { label: "Pricing", href: "#pricing" }, { label: "Docs", href: "https://docs.snapotter.com" }, { label: "Contact", href: "/contact" }, ]; export function Navbar() { const [open, setOpen] = useState(false); const [stars, setStars] = useState("Star"); useEffect(() => { fetch("https://api.github.com/repos/ashim-hq/ashim") .then((res) => res.json()) .then((data) => { if (typeof data.stargazers_count === "number") { setStars(formatStarCount(data.stargazers_count)); } }) .catch(() => {}); }, []); return ( ); }