mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-10 07:27:23 +02:00
16889a9e30ac4dfb536934d456dbac797b3e39f0
Remove the manual `id` parameter from useReqTimelineEnhanced and generate it
automatically from the filter, relays, and stream option. This prevents bugs
where the ID doesn't match the actual query parameters.
Benefits:
- Simpler API - one less parameter to pass
- Impossible to create ID/filter mismatches
- ID always perfectly reflects what's being queried
- More maintainable and less error-prone
The subscription ID is now generated as:
`req-${JSON.stringify(filters)}-${relays.join(",")}-${stream}`
This ensures the subscription re-triggers when any of these values change,
which is exactly when we want to re-subscribe.
Updated call site in ReqViewer.tsx to use the new API.
…
Languages
TypeScript
98.9%
CSS
0.8%
JavaScript
0.3%