useCmsBlock
Category:
CMS (Shopping Experiences)
Composable to get cms block content
Types
ts
export function useCmsBlock<BLOCK_TYPE extends Schemas["CmsBlock"]>(
content: BLOCK_TYPE,
): UseCmsBlockReturn
ts
export type UseCmsBlockReturn = {
/**
* Cms block content
*/
block: Schemas["CmsBlock"];
/**
* Get slot content by slot name (identifier)
* @example getSlotContent("main")
*/
getSlotContent(slotName: string): ArrayElement<Schemas["CmsBlock"]["slots"]>;
};