mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-06-05 20:15:31 -04:00
5a1636baa3
- Replace Biome with oxlint + oxfmt (OXC toolchain) for linting and formatting - Add .oxlintrc.json and .oxfmtrc.json configuration files - Update VS Code settings and devcontainer to use oxc-vscode extension - Remove contact form, Resend email integration, and related server action/schema - Remove unused UI components (accordion, alert, card, tabs, toggle, etc.)
31 lines
738 B
TypeScript
31 lines
738 B
TypeScript
import { getImageProps } from "next/image";
|
|
|
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
type CommentAvatarProps = {
|
|
name: string;
|
|
image?: string | null;
|
|
className?: string;
|
|
};
|
|
|
|
const CommentAvatar = ({ name, image, className }: CommentAvatarProps) => (
|
|
<Avatar className={cn("size-10", className)}>
|
|
{image && (
|
|
<AvatarImage
|
|
{...getImageProps({
|
|
src: image,
|
|
alt: `@${name}'s avatar`,
|
|
width: 40,
|
|
height: 40,
|
|
}).props}
|
|
width={undefined}
|
|
height={undefined}
|
|
/>
|
|
)}
|
|
<AvatarFallback>{name.charAt(0).toUpperCase()}</AvatarFallback>
|
|
</Avatar>
|
|
);
|
|
|
|
export { CommentAvatar };
|