import cs from 'classnames'; import { PlaceHolder, PlaceHolderTypes } from '../ConversationPlaceHolder'; import styles from './ConversationListContent.module.scss'; import type { ConversationListContentProps } from '../../../types/conversation'; export function ConversationListContent(props: ConversationListContentProps) { const { children, empty = false, loading = false, error = false, PlaceholderEmptyList = , PlaceholderLoading = , PlaceholderLoadError = , className, style, } = props; let content; if (error) { content = PlaceholderLoadError; } else if (loading) { content = PlaceholderLoading; } else if (empty) { content = PlaceholderEmptyList; } else { content = children; } return (
{content}
); } export default ConversationListContent;