1
0
mirror of https://github.com/dwaxweiler/connector-mobilizon synced 2025-06-05 21:59:25 +02:00

only reload current block's events

This commit is contained in:
Daniel Waxweiler
2022-06-06 12:16:12 +02:00
parent b3e9034ada
commit 456b4a9da1
5 changed files with 17 additions and 7 deletions

View File

@ -1,19 +1,22 @@
/* eslint-disable @wordpress/i18n-ellipsis */
const { useBlockProps } = wp.blockEditor
const { __ } = wp.i18n
const NAME = '<wordpress-name>'
export default ({ attributes }) => {
const blockProps = useBlockProps.save()
return (
<div
className={NAME + '_events-list'}
data-maximum={attributes.eventsCount}
data-group-name={attributes.groupName}
{...blockProps}
>
<div style="display: none;">
<div style={{ display: 'none' }}>
{__('The events could not be loaded!', '<wordpress-name>')}
</div>
<div style="display: none;">
<div style={{ display: 'none' }}>
{__('The group could not be found!', '<wordpress-name>')}
</div>
<ul>