Skip to content

useCategory

useCategory

Category:
Product

Composable to get the category from current CMS context

Types

ts
export function useCategory(
  category?: Ref<Schemas["Category"]>,
): UseCategoryReturn

source code

ts
export type UseCategoryReturn = {
  /**
   * Current category entity
   */
  category: ComputedRef<Schemas["Category"]>;
};

source code