Download frontend/src/components/ErrorMessage.js from Mr-Thop/DigitalDB: direct link, hf CLI and curl.
- Browser
- Download file 756 Bytes
-
https://huggingface.co/spaces/Mr-Thop/DigitalDB/resolve/main/frontend/src/components/ErrorMessage.js
- Command line
-
hf download hf://spaces/Mr-Thop/DigitalDB/frontend/src/components/ErrorMessage.js
-
curl -L -o ErrorMessage.js https://huggingface.co/spaces/Mr-Thop/DigitalDB/resolve/main/frontend/src/components/ErrorMessage.js
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; | |