plugin updates

This commit is contained in:
Tony Volpe
2024-09-25 09:45:47 -04:00
parent cc870f301f
commit f6021c7c22
245 changed files with 4835 additions and 4671 deletions

View File

@@ -8,6 +8,7 @@ import MeetingEdit from '../../shared/Meeting/MeetingEdit';
import ErrorHandler from '../../shared/Common/ErrorHandler';
import { __ } from '@wordpress/i18n';
import { isFullSiteEditor } from '../../utils/withMetaData';
import StylesheetErrorBondary from '../Common/StylesheetErrorBondary';
const ConnectionStatus = {
Connected: 'Connected',
@@ -28,17 +29,28 @@ export interface IMeetingBlockProps extends IMeetingBlockAttributes {
export default function registerMeetingBlock() {
const editComponent = (props: IMeetingBlockProps) => {
if (props.attributes.preview) {
return <MeetingGutenbergPreview />;
} else if (connectionStatus === ConnectionStatus.Connected) {
return <MeetingEdit {...props} preview={true} origin="gutenberg" />;
} else {
return <ErrorHandler status={401} />;
}
const isPreview = props.attributes.preview;
const isConnected = connectionStatus === ConnectionStatus.Connected;
return (
<StylesheetErrorBondary>
{isPreview ? (
<MeetingGutenbergPreview />
) : isConnected ? (
<MeetingEdit
{...props}
preview={true}
origin="gutenberg"
fullSiteEditor={isFullSiteEditor()}
/>
) : (
<ErrorHandler status={401} />
)}
</StylesheetErrorBondary>
);
};
// We do not support the full site editor: https://issues.hubspotcentral.com/browse/WP-1033
if (!WpBlocksApi || isFullSiteEditor()) {
if (!WpBlocksApi) {
return null;
}