"use client"; import { AutoTextSize } from "auto-text-size"; import Image from "@/components/image"; import type { characters } from "@/lib/db/schema"; // TODO: Change amber type export default function Avatar({ char, scale = 1, selected, ...props }: React.ComponentProps<"div"> & { char: typeof characters.$inferInsert; scale?: number; selected?: boolean | 0; }) { const star = (key: number) => ( Star ); const stars = []; for (let i = 0; i < (char.stars || 0); i++) stars.push(star(i)); return (
{char.name}
{char.name}
{stars}
); }