import { RenderType, TypeRenderer } from '@graphcommerce/next-ui' import RowBlogContent from '../Blog/RowBlogContent' import RowButtonLinkList from '../Row/RowButtonLinkList' import RowColumnOne from '../Row/RowColumnOne' import RowColumnThree from '../Row/RowColumnThree' import RowColumnTwo from '../Row/RowColumnTwo' import RowContentLinks from '../Row/RowContentLinks' import RowHeroBanner from '../Row/RowHeroBanner' import RowProductBackstory from '../Row/RowProductBackstory' import RowProductGrid from '../Row/RowProductGrid' import RowQuote from '../Row/RowQuote' import RowServiceOptions from '../Row/RowServiceOptions' import RowSpecialBanner from '../Row/RowSpecialBanner' import RowSwipeableGrid from '../Row/RowSwipeableGrid' import { PageContentQueryFragment } from './PageContentQueryFragment.gql' type ContentTypeRenderer = TypeRenderer const defaultRenderer: Partial = { RowColumnOne, RowColumnTwo, RowColumnThree, RowHeroBanner, RowProductGrid, RowSpecialBanner, RowQuote, RowSwipeableGrid, RowProductBackstory, RowBlogContent, RowButtonLinkList, RowServiceOptions, RowContentLinks, } export type PageProps = Partial & { renderer?: Partial } export default function PageContent(props: PageProps) { const { content, renderer } = props const mergedRenderer = { ...defaultRenderer, ...renderer } as ContentTypeRenderer return ( <> {content?.map((item) => ( ))} ) }