Files
eranos/src/hooks
Chad Curtis b8b7f638ee Bake the country picker into the discovery search toolbar
The pledges page already had a Globe-icon country popover sitting next
to a sort dropdown and the relay-driven search toolbar. The three
side-by-side filter affordances duplicated each other and pulled focus
away from the section heading. Collapse the cluster into the shared
DiscoverySearchToolbar:

- Drop the page-local Recent / Bounty / Deadline sort dropdown on
  pledges. The toolbar's Default / Top / New sort, backed by NIP-50,
  already covers the same ground and applies to every discovery
  surface; pledges fall through to a newest-first chronological view
  inside each lifecycle section.

- Add the country picker as a first-class prop on
  DiscoverySearchToolbar (`country` + `onCountryChange`) so all
  three discovery pages share the same Globe button without a generic
  trailing-slot escape hatch. Brand-orange icon in the neutral state,
  country flag emoji when selected.

- Extend useNip50Search with an optional `iTags` array, forwarded as
  a standard `#i` filter alongside the `search` field. A non-empty
  iTags array also activates the hook so picking a country with no
  typed query produces a country-scoped grid, narrowing kind 34550 /
  36639 by NIP-73 external identifier.

- Extend useAllCampaigns with a `countryCode` parameter that adds
  the same `#i` filter to the relay query. AllCampaignsPage tracks
  the country on the URL alongside the existing `sort` and `q`
  params so country-scoped views are linkable.

- Brand-orange the ListFilter icon on the toolbar to match the
  pledges-page aesthetic the user wanted to spread to the other
  discovery pages.
2026-05-25 02:22:15 -05:00
..
2026-05-21 19:04:41 -05:00
2026-05-17 01:00:49 -07:00
2026-05-23 20:56:43 -05:00
2026-04-18 16:28:41 +05:45