feat(20-01): extend UIStore with FAB/catalog state, add useTags hook, update useGlobalItems

- Add fabMenuOpen, openFabMenu, closeFabMenu to UIStore
- Add catalogSearchOpen, catalogSearchMode, openCatalogSearch, closeCatalogSearch
- openCatalogSearch also closes FAB menu (natural flow)
- Create useTags hook with 5-min staleTime cache
- Add optional tags parameter to useGlobalItems for tag filtering
This commit is contained in:
2026-04-06 07:57:47 +02:00
parent 2ec1276849
commit 67facea338
6 changed files with 64 additions and 20 deletions

View File

@@ -17,11 +17,13 @@ describe("Tag Service", () => {
});
it("returns all tags as { id, name } ordered alphabetically", async () => {
await db.insert(tags).values([
{ name: "bikepacking" },
{ name: "ultralight" },
{ name: "accessories" },
]);
await db
.insert(tags)
.values([
{ name: "bikepacking" },
{ name: "ultralight" },
{ name: "accessories" },
]);
const result = await getAllTags(db);
expect(result).toHaveLength(3);