Skip to content

Commit

Permalink
Change method name.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauteri committed Dec 15, 2024
1 parent a07173a commit b01ed8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion includes/core/classes/blocks/class-rsvp.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function transform_block_content( string $block_content, array $block ):
$button_tag = $block_instance->locate_button_tag( $tag );
if ( $button_tag ) {
$button_tag->set_attribute( 'data-wp-interactive', 'gatherpress' );
$button_tag->set_attribute( 'data-wp-on--click', 'actions.rsvpChangeStatus' );
$button_tag->set_attribute( 'data-wp-on--click', 'actions.updateRsvp' );
}

// Update the block content with new attributes.
Expand Down
16 changes: 1 addition & 15 deletions src/blocks/rsvp-v2/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@ import { getFromGlobal } from '../../helpers/globals';

const { state, actions } = store('gatherpress', {
actions: {
rsvpOpenModal() {
const modal = document.querySelector('.gatherpress-rsvp-modal');

if (modal) {
modal.classList.add('gatherpress--is-visible');
}
},
rsvpCloseModal() {
const modal = document.querySelector('.gatherpress-rsvp-modal');

if (modal) {
modal.classList.remove('gatherpress--is-visible');
}
},
rsvpChangeStatus() {
updateRsvp() {
let status =
state.rsvpStatus ??
getFromGlobal('eventDetails.currentUser.status') ??
Expand Down

0 comments on commit b01ed8f

Please sign in to comment.