diff --git a/src/components/ui/avatar.tsx b/src/components/ui/avatar.tsx index e8d8e30..51e507b 100644 --- a/src/components/ui/avatar.tsx +++ b/src/components/ui/avatar.tsx @@ -5,55 +5,46 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar" import { cn } from "@/lib/utils" -const Avatar = ( - { - ref, - className, - ...props - }: React.ComponentPropsWithoutRef & { - ref: React.RefObject>; - } -) => () +const Avatar = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) Avatar.displayName = AvatarPrimitive.Root.displayName -const AvatarImage = ( - { - ref, - className, - ...props - }: React.ComponentPropsWithoutRef & { - ref: React.RefObject>; - } -) => () +const AvatarImage = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) AvatarImage.displayName = AvatarPrimitive.Image.displayName -const AvatarFallback = ( - { - ref, - className, - ...props - }: React.ComponentPropsWithoutRef & { - ref: React.RefObject>; - } -) => () +const AvatarFallback = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)) AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName export { Avatar, AvatarImage, AvatarFallback } diff --git a/src/components/ui/breadcrumb.tsx b/src/components/ui/breadcrumb.tsx index b32a52e..60e6c96 100644 --- a/src/components/ui/breadcrumb.tsx +++ b/src/components/ui/breadcrumb.tsx @@ -4,55 +4,47 @@ import { ChevronRight, MoreHorizontal } from "lucide-react" import { cn } from "@/lib/utils" -const Breadcrumb = ( - { - ref, - ...props +const Breadcrumb = React.forwardRef< + HTMLElement, + React.ComponentPropsWithoutRef<"nav"> & { + separator?: React.ReactNode } -) =>