import { Link } from 'expo-router'; import { FlatList, StyleSheet, Text, View } from 'react-native'; import useSWR from 'swr'; import type { UserSummaryDTO } from '@musicshare/shared'; import { Avatar } from '@/components/Avatar'; import { Body, Button } from '@/components/ui'; import { api } from '@/lib/api'; import { showError } from '@/lib/errors'; import { colors, space } from '@/lib/theme'; export default function BlockedScreen() { const { data: blocked = [], mutate, isLoading } = useSWR('/me/blocks'); const unblock = async (username: string) => { try { await api.unblock(username); await mutate(); } catch (err) { showError(err); } }; return ( u.id} contentContainerStyle={styles.list} ListEmptyComponent={isLoading ? null : You haven't blocked anyone. Block someone from the ⋯ menu on their profile.} renderItem={({ item: u }) => ( {u.displayName ?? u.username}