General fixes. Still far from good or working

This commit is contained in:
2026-01-11 13:21:01 -05:00
parent 0a361f51a1
commit 67daefb919
83 changed files with 733 additions and 1053 deletions

View File

@@ -1,15 +1,15 @@
"use client";
'use client';
import { type ComponentProps } from "react";
import { AvatarImage } from "@/components/ui/avatar";
import { cn } from "@/lib/utils";
import * as AvatarPrimitive from "@radix-ui/react-avatar";
import { User } from "lucide-react";
import { type ComponentProps } from 'react';
import { AvatarImage } from '@/components/ui/avatar';
import { cn } from '@/lib/utils';
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import { User } from 'lucide-react';
type BasedAvatarProps = ComponentProps<typeof AvatarPrimitive.Root> & {
src?: string | null;
fullName?: string | null;
imageProps?: Omit<ComponentProps<typeof AvatarImage>, "data-slot">;
imageProps?: Omit<ComponentProps<typeof AvatarImage>, 'data-slot'>;
fallbackProps?: ComponentProps<typeof AvatarPrimitive.Fallback>;
userIconProps?: ComponentProps<typeof User>;
};
@@ -29,7 +29,7 @@ const BasedAvatar = ({
<AvatarPrimitive.Root
data-slot="avatar"
className={cn(
"relative flex size-8 shrink-0 cursor-pointer overflow-hidden rounded-full",
'relative flex size-8 shrink-0 cursor-pointer overflow-hidden rounded-full',
className,
)}
{...props}
@@ -45,20 +45,20 @@ const BasedAvatar = ({
{...fallbackProps}
data-slot="avatar-fallback"
className={cn(
"bg-muted flex size-full items-center justify-center rounded-full",
'bg-muted flex size-full items-center justify-center rounded-full',
fallbackProps?.className,
)}
>
{fullName ? (
fullName
.split(" ")
.split(' ')
.map((n) => n[0])
.join("")
.join('')
.toUpperCase()
) : (
<User
{...userIconProps}
className={cn("", userIconProps?.className)}
className={cn('', userIconProps?.className)}
/>
)}
</AvatarPrimitive.Fallback>