import { useTimeout } from "ra-core"; import type { ReactNode } from "react"; import { ListPlaceholder } from "./ListPlaceholder.tsx"; export const SimpleListLoading = (props: SimpleListLoadingProps) => { const { className, hasLeftAvatarOrIcon, hasRightAvatarOrIcon, hasSecondaryText, hasTertiaryText, nbFakeLines = 5, ...rest } = props; const oneSecondHasPassed = useTimeout(1000); return oneSecondHasPassed ? ( ) : null; }; const times = (nbChildren: number, fn: (key: number) => ReactNode) => Array.from({ length: nbChildren }, (_, key) => fn(key)); export interface SimpleListLoadingProps { className?: string; hasLeftAvatarOrIcon?: boolean; hasRightAvatarOrIcon?: boolean; hasSecondaryText?: boolean; hasTertiaryText?: boolean; nbFakeLines?: number; }