File "get-block-map.ts"
Full Path: /home/warrior1/public_html/plugins/woocommerce/packages/woocommerce-blocks/assets/js/atomic/utils/get-block-map.ts
File size: 530 bytes
MIME-type: text/x-java
Charset: utf-8
/**
* External dependencies
*/
import { getRegisteredBlockComponents } from '@woocommerce/blocks-registry';
import type { RegisteredBlockComponent } from '@woocommerce/types';
/**
* Internal dependencies
*/
import '../blocks/component-init';
/**
* Map named Blocks to defined React Components to render on the frontend.
*
* @param {string} blockName Name of the parent block.
*/
export const getBlockMap = (
blockName: string
): Record< string, RegisteredBlockComponent > =>
getRegisteredBlockComponents( blockName );