interface KindCategories

Returned by useCategories: one kind's categories.

Properties

The categories of the kind, by position then slug.

byId: Map<string, Category>

Resolves a dump's or playlist's categoryIds to its category chips.

isLoaded: boolean

Whether the first fetch has ended. It is also true after a network error, with no categories.

refresh: () => Promise<void>

Refetches both kinds. The category manager calls it after each change.

Usage

import { type KindCategories } from "src/hooks/category/useCategories.ts";