Skip to content

Commit

Permalink
For membership widget, change the url hash to membership instead of t…
Browse files Browse the repository at this point in the history
…ickets (#2129)
  • Loading branch information
vidya-ram authored Oct 24, 2024
1 parent b149d68 commit a92af05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion funnel/assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(() => {
initEmbed(markdownContainer);

if (tickets) {
Ticketing.init(tickets);
Ticketing.init(tickets, true);
}
};
});
7 changes: 4 additions & 3 deletions funnel/assets/js/utils/ticket_widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { AJAX_TIMEOUT, RETRY_INTERVAL } from '../constants';
import Analytics from './analytics';

const Ticketing = {
init(tickets) {
init(tickets, membership = false) {
if (tickets.boxofficeUrl) {
this.initBoxfficeWidget(tickets);
}

this.initTicketModal();
this.initTicketModal(membership);
},

initBoxfficeWidget({
Expand Down Expand Up @@ -114,8 +114,9 @@ const Ticketing = {
);
},

initTicketModal() {
initTicketModal(membership) {
this.urlHash = '#tickets';
if (membership) this.urlHash = '#membership';
if (window.location.hash.indexOf(this.urlHash) > -1) {
this.openTicketModal();
}
Expand Down

0 comments on commit a92af05

Please sign in to comment.