♻️ Add an 'available tags' store
Cc: @shaqued
Hi @tvaintrob
Pain
Currently, whenever the developer wants to interact with the available tags he has to interact with the useAvailableTags hook, which returns the filters in it's raw format (pages). While the query is cached, this is still messy and may lead to "loading" in unwanted places
What code could be improved?
We should add a store that loads the available tags, and exposes a 'list' and 'search by name' api. This can improve the code in: https://github.com/epsagon/lupa/blob/75bd36f6642fd387ef15e08bca8b5bb1713ef339/web/src/features/search/components/FilterBuilder/TagSelector.tsx https://github.com/epsagon/lupa/blob/531199c4e43122addea2baea0a840788070bc953/web/src/features/search/components/FilterBuilder/FilterBuilder.tsx
Tasks
- [ ] Create the store
- [ ] Use it in TagSelector
- [ ] Use it in FilterBuilder
Thanks!