2024-08-29 02:45:27 +03:00
|
|
|
/**
|
|
|
|
* WordPress dependencies
|
|
|
|
*/
|
|
|
|
import { registerBlockType } from '@wordpress/blocks';
|
|
|
|
import { useBlockProps } from '@wordpress/block-editor';
|
2024-08-29 23:38:40 +03:00
|
|
|
import ServerSideRender from '@wordpress/server-side-render';
|
2024-08-29 02:45:27 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import metadata from './block.json';
|
|
|
|
import './style.scss';
|
|
|
|
|
|
|
|
const Edit = ( { attributes, name } ) => {
|
|
|
|
const blockProps = useBlockProps();
|
|
|
|
return (
|
|
|
|
<div { ...blockProps }>
|
|
|
|
<ServerSideRender block={ name } attributes={ attributes } skipBlockSupportAttributes />
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
registerBlockType( metadata.name, {
|
|
|
|
edit: Edit,
|
|
|
|
save: () => null,
|
|
|
|
} );
|