export function Spinner() { return (
) } export function EmptyState({ message = 'No data found' }: { message?: string }) { return (

{message}

) } export function HashBadge({ hash, short = true }: { hash: string; short?: boolean }) { const display = short && hash.length > 8 ? hash.slice(0, 8) : hash return ( {display} ) } export function Pagination({ total, limit, offset, onPageChange, onLimitChange, }: { total: number limit: number offset: number onPageChange: (newOffset: number) => void onLimitChange: (newLimit: number) => void }) { const currentPage = Math.floor(offset / limit) + 1 const totalPages = Math.ceil(total / limit) const startItem = total === 0 ? 0 : offset + 1 const endItem = Math.min(offset + limit, total) const canPrev = offset > 0 const canNext = offset + limit < total return (
{startItem}-{endItem} of {total}
Page {currentPage} / {totalPages || 1}
) }