import './tail.css'; import type { RefObject } from 'preact'; import { Loading } from './card'; /** Below the rows: what is loading, what failed, and the mark that pulls in the next page. */ export function Tail({ sentinel, more, busy, error, retry, noun, }: { sentinel: RefObject; more: boolean; busy: boolean; error: string; retry: () => void; noun: string; }) { if (!more && !error) return null; return (
{error ? ( <> {error}{' '} ) : busy ? ( ) : null}
); }