import { Ban, Check, Loader2, Lock, Share2, Star, UserCheck, UserPlus } from 'lucide-react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { fmtNumber, t } from '../../i18n' import { follow, getProfile, getProfileItems, getPublicProfile, PROFILE_ITEMS_PAGE, profileLink, unfollow, type Profile } from '../../lib/cloud/social' import { STATUSES, TOP_CATEGORIES } from '../../lib/constants' import { cx, formatRating } from '../../lib/utils' import { useMedia } from '../../store' import type { MediaItem, WatchStatus } from '../../types' import ConfirmDialog from '../ConfirmDialog' import ReportButton from '../moderation/ReportButton' import { blockUser, unblockUser, useBlocked } from '../../lib/cloud/moderation' import Poster from '../Poster' import { EmptyState, SectionTitle } from '../ui' import TopFive from '../TopFive' import Avatar from './Avatar' import Sheet from './Sheet' import { useSocial } from './SocialProvider' function PosterTile({ item, onOpen, caption }: { item: MediaItem; onOpen: () => void; caption?: string }) { return ( ) } function Stat({ value, label, onClick }: { value?: number; label: string; onClick?: () => void }) { const body = ( <> {value == null ? '—' : fmtNumber(value)} {label} > ) return onClick ? ( ) : (
@{profile.username}
{profile.isPrivate &&
{profile.bio}
} {blocked && (
{t('social.privateTitle')}
{t('social.privateText')}
{t('social.publicCtaTitle')}
{t('social.publicCtaText', { name: profile.displayName })}
{toast}
)}{t('social.noRecent')}
)} > ) } /** Onglet Top 5 : le même affichage que l'ancien accueil. Le mien se modifie ici ; celui d'un autre est en lecture seule. */ function TopTab({ profile, onOpen }: { profile: Profile; onOpen: (i: MediaItem) => void }) { return ({t('social.emptyLibrary')}
)} {loading && (