function UserAvatar({ userId }) { const { src, isLoading, isFromCache, error } = useAuthenticatedImage({ db: db.instance, store: 'imageCache', url: `/api/users/${userId}/photo`, token: accessToken, placeholder: '/images/default-avatar.png', ttl: 86400000, // 24h staleTime: 3600000 // 1h }); if (isLoading) return ; return Avatar; }