refactor(client): centralize error feedback with toast events

- emit API/network failures through a shared toast event bridge

- remove per-page inline error notifications to avoid duplicate error UI

- dedupe repeated toast messages to keep feedback readable
This commit is contained in:
ars9 committed 2026-04-10 22:24:30 +03:00
1 parent 7444082b65
commit ccce3381c1
25 files changed
+59 -80

No files matched your search

@@ -48,8 +48,6 @@ export function CreateScenarioPage() {
/>
</div>
{error && <p className={styles.error}>{error}</p>}
<form onSubmit={handleSubmit} noValidate>
<Card className={styles.formCard}>
<div className={styles.formFields}>
@@ -64,8 +64,6 @@ export function CreateStepPage() {
/>
</div>
{error && <p className={styles.error}>{error}</p>}
<form onSubmit={handleSubmit} noValidate>
<Card className={styles.formCardFull}>
<div className={styles.formFields}>
@@ -68,7 +68,6 @@ export function EditScenarioPage() {
/>
</div>
{error && <p className={styles.error}>{error}</p>}
{loading && <p className={styles.muted}>{t('scenarios.loading')}</p>}
{!loading && scenario && (
@@ -72,7 +72,6 @@ export function EditStepPage() {
/>
</div>
{error && <p className={styles.error}>{error}</p>}
{loading && <p className={styles.muted}>{t('steps.loading')}</p>}
{!loading && step && (
@@ -11,7 +11,6 @@ import {
Card,
DescriptionList,
Input,
Notification,
Select,
Table,
Timestamp,
@@ -306,14 +305,6 @@ export function ScenarioDetailPage() {
)}
</div>
{error && (
<Notification
variant="error"
title={error.startsWith('404') ? t('errors.not_found') : undefined}
>
{error.startsWith('404') ? t('errors.not_found_scenario', { id }) : error}
</Notification>
)}
{loading && <p className={styles.muted}>{t('scenarios.loading')}</p>}
{scenario && (
@@ -114,7 +114,6 @@ export function ScenariosPage() {
</Button>
</div>
</div>
{error && <p className={styles.error}>{error}</p>}
<Table
columns={columns}
data={items}