mirror of
https://github.com/jnsahaj/tweakcn.git
synced 2026-08-30 18:10:28 +08:00
55 lines
2.0 KiB
TypeScript
55 lines
2.0 KiB
TypeScript
"use client";
|
|
|
|
import DiscordIcon from "@/assets/discord.svg";
|
|
import GitHubIcon from "@/assets/github.svg";
|
|
import Logo from "@/assets/logo.svg";
|
|
import TwitterIcon from "@/assets/twitter.svg";
|
|
import { SocialLink } from "@/components/social-link";
|
|
import { Separator } from "@/components/ui/separator";
|
|
import { UserProfileDropdown } from "@/components/user-profile-dropdown";
|
|
import { useGithubStars } from "@/hooks/use-github-stars";
|
|
import { formatCompactNumber } from "@/utils/format";
|
|
import Link from "next/link";
|
|
import { GetProCTA } from "./get-pro-cta";
|
|
|
|
export function Header() {
|
|
const { stargazersCount } = useGithubStars("jnsahaj", "tweakcn");
|
|
|
|
return (
|
|
<header className="border-b">
|
|
<div className="flex items-center justify-between gap-2 p-4">
|
|
<div className="flex items-center gap-1">
|
|
<Link href="/" className="flex items-center gap-2">
|
|
<Logo className="size-6" title="tweakcn" />
|
|
<span className="hidden font-bold md:block">tweakcn</span>
|
|
</Link>
|
|
</div>
|
|
<div className="flex items-center gap-3.5">
|
|
<GetProCTA className="h-8" />
|
|
|
|
<SocialLink
|
|
href="https://github.com/jnsahaj/tweakcn"
|
|
className="flex items-center gap-2 text-sm font-bold"
|
|
>
|
|
<GitHubIcon className="size-4" />
|
|
{stargazersCount > 0 && formatCompactNumber(stargazersCount)}
|
|
</SocialLink>
|
|
<Separator orientation="vertical" className="h-8" />
|
|
<div className="flex items-center gap-3.5">
|
|
<div className="hidden items-center gap-3.5 md:flex">
|
|
<SocialLink href="https://discord.gg/Phs4u2NM3n">
|
|
<DiscordIcon className="size-5" />
|
|
</SocialLink>
|
|
</div>
|
|
<SocialLink href="https://x.com/iamsahaj_xyz">
|
|
<TwitterIcon className="size-4" />
|
|
</SocialLink>
|
|
</div>
|
|
<Separator orientation="vertical" className="h-8" />
|
|
<UserProfileDropdown />
|
|
</div>
|
|
</div>
|
|
</header>
|
|
);
|
|
}
|