@@ -6,12 +6,19 @@ import { useRef, useState } from 'react'
66import { useToast } from '@/lib/hooks/use-toast'
77import { Avatar , AvatarImage , AvatarFallback } from '@/ui/primitives/avatar'
88import { cn , exponentialSmoothing } from '@/lib/utils'
9- import { Pencil , Loader2 } from 'lucide-react'
9+ import {
10+ Pencil ,
11+ Loader2 ,
12+ ImageIcon ,
13+ ChevronsUp ,
14+ ImagePlusIcon ,
15+ } from 'lucide-react'
1016import { motion , AnimatePresence } from 'framer-motion'
1117import { cardVariants } from '@/ui/primitives/card'
1218import { uploadTeamProfilePictureAction } from '@/server/team/team-actions'
1319import { useAction } from 'next-safe-action/hooks'
1420import { defaultSuccessToast , defaultErrorToast } from '@/lib/hooks/use-toast'
21+ import { Badge } from '@/ui/primitives/badge'
1522
1623interface ProfilePictureCardProps {
1724 className ?: string
@@ -87,18 +94,23 @@ export function ProfilePictureCard({ className }: ProfilePictureCardProps) {
8794 onMouseLeave = { ( ) => setIsHovered ( false ) }
8895 >
8996 < Avatar
90- className = { cn ( 'h-24 w-24 border-none drop-shadow-lg filter' , className ) }
97+ className = { cn (
98+ 'h-24 w-24' ,
99+ {
100+ 'border-none drop-shadow-lg filter' : team ?. profile_picture_url ,
101+ } ,
102+ className
103+ ) }
91104 >
92105 < AvatarImage
93106 src = { team ?. profile_picture_url || '' }
94107 alt = { `${ team ?. name } 's profile picture` }
95108 />
96- < AvatarFallback className = "relative text-2xl font-semibold" >
97- { team ? (
98- team ?. name ?. charAt ( 0 ) . toUpperCase ( )
99- ) : (
100- < Skeleton className = "absolute inset-0" />
101- ) }
109+ < AvatarFallback className = "bg-bg-200 relative text-2xl font-semibold" >
110+ < ImagePlusIcon className = "text-fg-500" />
111+ < Badge className = "text-fg-300 absolute bottom-3 left-1/2 -translate-x-1/2 whitespace-nowrap uppercase backdrop-blur-md" >
112+ Upload < ChevronsUp className = "text-accent size-4" />
113+ </ Badge >
102114 </ AvatarFallback >
103115 </ Avatar >
104116
0 commit comments