mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-21 13:24:44 +08:00
feat: use number ticker to display star count (#89)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import { StarFilledIcon, GitHubLogoIcon } from "@radix-ui/react-icons";
|
||||
import Link from "next/link";
|
||||
|
||||
import { NumberTicker } from "~/components/magicui/number-ticker";
|
||||
import { Button } from "~/components/ui/button";
|
||||
import { env } from "~/env";
|
||||
|
||||
@@ -72,9 +73,9 @@ export async function StarCounter() {
|
||||
return (
|
||||
<>
|
||||
<StarFilledIcon className="size-4 transition-colors duration-300 group-hover:text-yellow-500" />
|
||||
<span className="font-mono tabular-nums">
|
||||
{stars !== null ? stars.toLocaleString() : "—"}
|
||||
</span>
|
||||
{stars && (
|
||||
<NumberTicker className="font-mono tabular-nums" value={stars} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user