CUB-116: Scaffold React frontend — Vite, TS, Tailwind
Some checks failed
Dev Build / build-test (pull_request) Failing after 2m13s
Some checks failed
Dev Build / build-test (pull_request) Failing after 2m13s
This commit is contained in:
21
frontend/src/components/ErrorState.tsx
Normal file
21
frontend/src/components/ErrorState.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
export default function ErrorState({
|
||||
message = 'Something went wrong.',
|
||||
onRetry,
|
||||
}: {
|
||||
message?: string
|
||||
onRetry?: () => void
|
||||
}) {
|
||||
return (
|
||||
<div className="flex min-h-[120px] flex-col items-center justify-center gap-3 rounded-xl border border-red-500/20 bg-red-950/30 p-6 text-center">
|
||||
<p className="text-sm text-red-300">{message}</p>
|
||||
{onRetry && (
|
||||
<button
|
||||
onClick={onRetry}
|
||||
className="rounded-lg bg-red-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-red-700"
|
||||
>
|
||||
Retry
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user