diff --git a/components/avatar.tsx b/components/avatar.tsx new file mode 100644 index 0000000..95ade3b --- /dev/null +++ b/components/avatar.tsx @@ -0,0 +1,33 @@ +import Image from "next/image"; +import { cn } from "@/lib/utils"; + +type AvatarProps = { + src: string; + alt: string; + size?: number; + unoptimized?: boolean; + className?: string; +}; + +/** + * Reusable avatar image component. + * + */ +export function Avatar({ + src, + alt, + size = 32, + unoptimized = true, + className, +}: AvatarProps) { + return ( + {alt} + ); +} diff --git a/components/leaderboard-table.tsx b/components/leaderboard-table.tsx index f7872db..14ccbd2 100644 --- a/components/leaderboard-table.tsx +++ b/components/leaderboard-table.tsx @@ -1,8 +1,8 @@ "use client"; import { useState, useMemo } from "react"; -import Image from "next/image"; import { Search, AlertTriangle } from "lucide-react"; +import { Avatar } from "./avatar"; import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip"; import { Card, @@ -154,12 +154,10 @@ export function LeaderboardTable({
- {user.name
- {t("comparison.avatarAlt", - {t("comparison.avatarAlt", {winnerAvatar ? ( - {t("comparison.avatarAlt", ) : null}

diff --git a/next.config.js b/next.config.js index 2e47547..3228a37 100644 --- a/next.config.js +++ b/next.config.js @@ -3,6 +3,7 @@ const nextConfig = { reactStrictMode: true, typedRoutes: true, images: { + unoptimized: true, remotePatterns: [ { protocol: "https",