/** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; const { Fragment } = wp.element; const { withFilters } = wp.components; const { TabPanel, Panel, PanelBody } = wp.components; import ChangelogItem from './changelog-item'; export const ChangelogTab = () => { const tabs = [ { name: 'kadence', title: __( 'Changelog', 'kadence' ), className: 'kadence-changelog-tab', }, { name: 'pro', title: __( 'Pro Changelog', 'kadence' ), className: 'kadence-pro-changelog-tab', }, ]; return ( { kadenceDashboardParams.changelog && ( { kadenceDashboardParams.proChangelog && kadenceDashboardParams.proChangelog.length && ( { ( tab ) => { switch ( tab.name ) { case 'kadence': return ( { kadenceDashboardParams.changelog.map( ( item, index ) => { return ; } ) } ); case 'pro': return ( { kadenceDashboardParams.proChangelog.map( ( item, index ) => { return ; } ) } ); } } } ) } { ( '' == kadenceDashboardParams.proChangelog || ( Array.isArray( kadenceDashboardParams.proChangelog ) && ! kadenceDashboardParams.proChangelog.length ) ) && ( { kadenceDashboardParams.changelog.map( ( item, index ) => { return ; } ) } ) } ) } ); }; export default withFilters( 'kadence_theme_changelog' )( ChangelogTab );