import { Fragment, memo } from 'react' import { Badge, Tooltip } from '@janhq/joi' import { AlertTriangleIcon, InfoIcon } from 'lucide-react' type Props = { compact?: boolean unit: string } const tooltipContent = `Your device doesn't have enough RAM to run this model. Consider upgrading your RAM or using a device with more memory capacity.` const NotEnoughMemoryLabel = ({ unit, compact }: Props) => ( <> {compact ? (
} content={ Not enough RAM: {tooltipContent} } />
) : ( Not enough {unit} } content={ Not enough RAM: {tooltipContent} } /> )} ) export default memo(NotEnoughMemoryLabel)