Skip to content

Commit

Permalink
Update content-update.js
Browse files Browse the repository at this point in the history
  • Loading branch information
qiyundai committed Oct 9, 2024
1 parent 7ab9a34 commit fe38835
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions events/scripts/content-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,21 @@ function createTag(tag, attributes, html, options = {}) {
async function updateRSVPButtonState(rsvpBtn, miloLibs, eventInfo) {
const rsvpData = BlockMediator.get('rsvpData');
const checkRed = getIcon('check-circle-red');
const { attendeeLimit, attendeeCount, allowWaitListing } = eventInfo;
const eventFull = +attendeeLimit <= +attendeeCount;
const {
attendeeLimit,
attendeeCount,
waitlistAttendeeCount,
waitlistAttendeeLimit,
allowWaitListing,
cloudType,
} = eventInfo;
let eventFull = false;

if (cloudType === 'CreativeCloud') {
eventFull = +attendeeLimit <= +attendeeCount;
} else if (cloudType === 'DX') {
eventFull = +waitlistAttendeeLimit <= +waitlistAttendeeCount;
}

const enableBtn = () => {
rsvpBtn.el.classList.remove('disabled');
Expand Down

0 comments on commit fe38835

Please sign in to comment.