cleanPage
The cleanPage function prepares the page content retrieved by React Bricks APIs to be used in the PageViewer
component.
It removes all the invalid blocks (unknown in the schema or not allowed for this page type).
Signature
Property | Definition |
---|---|
page | The page object, of type Page . |
pageTypes | The pageType schema, of type IPageType[] , as defined here. |
bricks | The block’s schema, of type IBlockType[] , as defined here. |
Return value
cleanPage
returns an object of type Page
, with the clean content and the invalidBlocksTypes
array containing the name of each invalid block that was removed.