Fix Avatar url sometimes giving error

This commit is contained in:
Jared Schoeny 2025-10-10 23:38:50 -10:00
parent 303ce2cbdc
commit e5f959ece1

View File

@ -43,7 +43,7 @@ export default function Avatar({
onUpload?: (url: string) => void
}) {
const supabase = createClient()
const [avatarUrl, setAvatarUrl] = useState<string | null>(url)
const [avatarUrl, setAvatarUrl] = useState<string | null>(null)
const [uploading, setUploading] = useState(false)
const fileInputRef = useRef<HTMLInputElement | null>(null)
const placeholderBgClass = getPlaceholderBgClass(uid)