Renders the menu that narrows a list of dumps or playlists to a category, on the index and playlists pages, on a profile's lists and on the search page.
f
CategorySwitcher(unnamed 0: CategorySwitcherProps): React.JSX.Element | null
Renders a button naming the category shown, "All" without one, that opens
the menu of every category of kind. It renders nothing while the site has
none.
I
CategorySwitcherProps
Passed to CategorySwitcher by FeedTabBar, ProfileDumpsTab,
ProfilePlaylistsTab, Playlists and Search, which keep the category in
their URL.
-
categorySlug: string
The category shown, or none for every dump or playlist.
-
kind: CategoryKind
The set it offers: dump categories for dumps, playlist ones for playlists.
-
onSelect: (slug: string | undefined) => void
Called with the slug of the category picked, or undefined for "All".
Usage
import * as mod from "src/components/category/CategorySwitcher.tsx";