Skip to content

Links empty state claims "All links are disabled" when a filter matches nothing #51

Description

@DennisAlund

Found while reviewing #48. Pre-existing, not caused by that PR.

src/pages/links.tsx:221 picks the empty-state copy from links.length > 0, which does not account for which filter is active.

Reproduction

30 links, none expired. Click the Disabled filter chip.

  • filtered.length === 0, so the empty state renders.
  • links.length > 0, so it renders t("links.allDisabled"): All links are disabled. Toggle "Show disabled" to see them.
  • Meanwhile toolbar-count reads 30 links.

The copy states the inverse of the truth, and it points at a "Show disabled" toggle that the filter chips replaced. links.showDisabled (src/i18n/en.ts:50) is now referenced nowhere outside the i18n files.

Fix

Branch the empty-state copy on filter. Add keys for the active/disabled/all cases to src/i18n/en.ts, id.ts, and sv.ts, and drop the orphaned links.showDisabled key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions