refactor: split frontend application features
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
83d14d23a2
commit
5d7a57fd00
32 changed files with 2563 additions and 2433 deletions
19
frontend/src/components/actions/ErrorAlert.tsx
Normal file
19
frontend/src/components/actions/ErrorAlert.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
export function ErrorAlert({
|
||||
message,
|
||||
retry,
|
||||
}: {
|
||||
message: string
|
||||
retry?: () => void | Promise<void>
|
||||
}) {
|
||||
return (
|
||||
<div className="error-alert" role="alert">
|
||||
<strong>Request failed</strong>
|
||||
<span>{message}</span>
|
||||
{retry && (
|
||||
<button type="button" onClick={() => void retry()}>
|
||||
Try again
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue