Spares every page fetching the site's categories: it loads both kinds once for the whole app, and again whenever the category manager changes them, here or in another browser, and after the socket reconnects. App mounts it inside WSProvider.

Functions

f
CategoriesProvider(unnamed 0: CategoriesProviderProps): React.JSX.Element

Provides CategoriesContext, fetching the categories on mount. Until a fetch succeeds, isLoaded stays false, so that no page takes an empty list for the truth and answers a category's URL with a 404; a failed first fetch is tried again 10 s later. A failed refresh keeps the previous list.

Interfaces