diff --git a/frontend/src/components/IncomingStreams.tsx b/frontend/src/components/IncomingStreams.tsx index eedcdeb4..7af9ccce 100644 --- a/frontend/src/components/IncomingStreams.tsx +++ b/frontend/src/components/IncomingStreams.tsx @@ -45,6 +45,35 @@ const ClaimableAmount: React.FC<{ stream: Stream }> = ({ stream }) => { ); }; +/** + * Shown when the current filter returns no results. + * Distinguished from the global empty-state (no streams at all), which is + * handled one level up in dashboard-view.tsx. + */ +const FilterEmptyState: React.FC<{ filter: string; onClearFilter: () => void }> = ({ filter, onClearFilter }) => ( +
+
+ + + +
+

+ No {filter} streams found. +

+

+ Try a different filter or wait for new streams to arrive. +

+ +
+); + const IncomingStreams: React.FC = ({ streams, onWithdraw, @@ -64,7 +93,7 @@ const IncomingStreams: React.FC = ({ try { await onWithdraw(stream); toast.success(`Successfully withdrew from stream #${stream.id}`); - } catch (error) { + } catch { toast.error(`Failed to withdraw from stream #${stream.id}`); } }; @@ -79,7 +108,9 @@ const IncomingStreams: React.FC = ({

- + setTemplateNameInput(event.target.value)} - placeholder="e.g. Monthly Contributor Payroll" - aria-label="Template name" - /> + setTemplateNameInput(e.target.value)} placeholder="e.g. Monthly Contributor Payroll" aria-label="Template name" />
- - {editingTemplateId ? ( - - ) : null} + + {editingTemplateId ? : null}
{templates.length === 0 ? ( -
-

No templates yet. Save your first stream setup.

-
+

No templates yet. Save your first stream setup.

) : (
    - {templates.map((template) => ( -
  • + {templates.map((t) => ( +
  • - {template.name} - Updated {formatTemplateUpdatedAt(template.updatedAt)} + {t.name} + Updated {formatTemplateUpdatedAt(t.updatedAt)}
    - - - + + +
  • ))} @@ -1003,126 +906,30 @@ export function DashboardView({ session, onDisconnect }: DashboardViewProps) { - - +
    - - + +
    -
    - - + +
    -
    - +
    - -