DigitalDB / frontend /src /components /ErrorMessage.js
Mr-Thop's picture
Add files
3db086d
Raw
History Blame Contribute Delete
756 Bytes
import React from 'react';
import { FaExclamationTriangle } from 'react-icons/fa';
const ErrorMessage = ({ message = 'Something went wrong!', onRetry }) => {
return (
<div className="flex flex-col items-center justify-center min-h-[400px] text-center">
<FaExclamationTriangle className="text-6xl text-red-500 mb-4" />
<h3 className="text-2xl font-semibold text-gray-800 mb-2">Oops!</h3>
<p className="text-gray-600 mb-6">{message}</p>
{onRetry && (
<button
onClick={onRetry}
className="px-6 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors"
>
Try Again
</button>
)}
</div>
);
};
export default ErrorMessage;