Spaces:
Paused
Paused
Download components/Chat/ErrorMessageDiv.tsx from matthoffner/chatbot: direct link, hf CLI and curl.
- Browser
- Download file 789 Bytes
-
https://huggingface.co/spaces/matthoffner/chatbot/resolve/d28de650899ced13e58e69617833760ae4cbf139/components/Chat/ErrorMessageDiv.tsx
- Command line
-
hf download hf://spaces/matthoffner/chatbot@d28de650899ced13e58e69617833760ae4cbf139/components/Chat/ErrorMessageDiv.tsx
-
curl -L -o ErrorMessageDiv.tsx https://huggingface.co/spaces/matthoffner/chatbot/resolve/d28de650899ced13e58e69617833760ae4cbf139/components/Chat/ErrorMessageDiv.tsx
789 Bytes
| import { IconCircleX } from '@tabler/icons-react'; | |
| import { FC } from 'react'; | |
| import { ErrorMessage } from '@/types/error'; | |
| interface Props { | |
| error: ErrorMessage; | |
| } | |
| export const ErrorMessageDiv: FC<Props> = ({ error }) => { | |
| return ( | |
| <div className="mx-6 flex h-full flex-col items-center justify-center text-red-500"> | |
| <div className="mb-5"> | |
| <IconCircleX size={36} /> | |
| </div> | |
| <div className="mb-3 text-2xl font-medium">{error.title}</div> | |
| {error.messageLines.map((line, index) => ( | |
| <div key={index} className="text-center"> | |
| {' '} | |
| {line}{' '} | |
| </div> | |
| ))} | |
| <div className="mt-4 text-xs opacity-50 dark:text-red-400"> | |
| {error.code ? <i>Code: {error.code}</i> : ''} | |
| </div> | |
| </div> | |
| ); | |
| }; | |