Spaces:
Runtime error
Runtime error
File size: 789 Bytes
a28cd69 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
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>
);
};
|