import type { ReactNode } from 'react' import { Button, Center, Stack, Text } from '@mantine/core' import { RefreshCw } from 'lucide-react' interface ServerErrorStateProps { title?: string description?: string onRetry?: () => void retrying?: boolean retryLabel?: string glyph?: ReactNode } export function ServerErrorState({ title = 'Something went wrong', description = 'The server returned an error while loading this page.', onRetry, retrying = false, retryLabel = 'Retry', glyph, }: ServerErrorStateProps) { const normalizedDescription = typeof description === 'string' ? description.trim() : '' const showDescription = normalizedDescription.length > 0 && normalizedDescription !== 'HTTP 500' && normalizedDescription !== 'HTTP 500.' return (