import React from 'react'; import {PageStatus} from '@common/http/page-status'; import {useChannel} from '@common/channels/requests/use-channel'; import {ChannelContent} from '@app/channels/channel-content'; import {SitePageLayout} from '@app/site-page-layout'; import {Channel} from '@common/channels/channel'; import {ChannelContentModel} from '@app/admin/channels/channel-content-config'; import {PageMetaTags} from '@common/http/page-meta-tags'; interface ChannelPageProps { slugOrId?: string | number; type?: 'list' | 'channel'; } export function ChannelPage({slugOrId, type = 'channel'}: ChannelPageProps) { const query = useChannel(slugOrId, 'channelPage', {channelType: type}); let content = null; if (query.data) { content = (
} // set key to force re-render when channel changes key={query.data.channel.id} isNested={false} />
); } else { content = ( ); } return {content}; }