Skip to content

fix(words): wire sort filter to URL params and API - #15

Merged
josego85 merged 2 commits into
mainfrom
fix/words-sort
Apr 4, 2026
Merged

josego85 merged 2 commits into
mainfrom
fix/words-sort

Conversation

@josego85

@josego85 josego85 commented Apr 4, 2026 •

Copy link
Copy Markdown
Owner

Changed

  • Docs: docs/api-integration.md — useWords hook documenta los 4 parámetros (page, search, category, sort) y la regla de leerlos siempre desde URL params

Fixed

  • Sort: Sort by (A-Z / Z-A) in words list had no effect — the select called an unconnected prop callback instead of updating URL params; now synced to ?sort= and propagated through useWords to the API

Removed

  • Sort: Removed "Newest first" and "Oldest first" sort options — not useful for a dictionary; created_at ordering has no meaningful value for end users browsing technical terms

josego85 added 2 commits April 4, 2026 16:47
Sort select was calling an unconnected prop callback — changes had no
  effect. Now reads/writes ?sort= URL param (consistent with ?category=)
  and passes it through useWords to the API. Removed newest/oldest
  options as they have no meaningful value in a dictionary context.
Updates useWords signature to include category and sort,
  adds note on reading params from URL state only.
@josego85
josego85 merged commit 8aa1066 into main Apr 4, 2026
7 checks passed
@josego85
josego85 deleted the fix/words-sort branch April 4, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant