mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-14 18:59:18 +02:00
Refactor `BLReconciliation.tsx` and multiple Shadcn/ui components by replacing them with custom, robust alternatives to resolve React #310 errors in production. Replit-Commit-Author: Agent Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/rmaxwaw
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
"use client"
|
|
|
|
import React, { forwardRef } from "react"
|
|
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
const Avatar = forwardRef<
|
|
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
>(({ className, ...props }, ref) => (
|
|
<AvatarPrimitive.Root
|
|
ref={ref}
|
|
className={cn(
|
|
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
))
|
|
Avatar.displayName = AvatarPrimitive.Root.displayName
|
|
|
|
const AvatarImage = forwardRef<
|
|
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
>(({ className, ...props }, ref) => (
|
|
<AvatarPrimitive.Image
|
|
ref={ref}
|
|
className={cn("aspect-square h-full w-full", className)}
|
|
{...props}
|
|
/>
|
|
))
|
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName
|
|
|
|
const AvatarFallback = forwardRef<
|
|
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
>(({ className, ...props }, ref) => (
|
|
<AvatarPrimitive.Fallback
|
|
ref={ref}
|
|
className={cn(
|
|
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
))
|
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
|
|
export { Avatar, AvatarImage, AvatarFallback }
|