2020-09-03 23:08:22 -04:00
|
|
|
import Vue from 'vue';
|
|
|
|
import InviteMembersBanner from '~/groups/components/invite_members_banner.vue';
|
|
|
|
|
|
|
|
export default function initInviteMembersBanner() {
|
|
|
|
const el = document.querySelector('.js-group-invite-members-banner');
|
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-09-14 20:09:30 -04:00
|
|
|
const {
|
|
|
|
svgPath,
|
|
|
|
inviteMembersPath,
|
|
|
|
trackLabel,
|
|
|
|
calloutsPath,
|
|
|
|
calloutsFeatureId,
|
|
|
|
groupId,
|
|
|
|
} = el.dataset;
|
2020-09-03 23:08:22 -04:00
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
|
|
|
provide: {
|
|
|
|
svgPath,
|
|
|
|
inviteMembersPath,
|
2020-09-16 11:09:32 -04:00
|
|
|
trackLabel,
|
2021-09-14 20:09:30 -04:00
|
|
|
calloutsPath,
|
|
|
|
calloutsFeatureId,
|
|
|
|
groupId,
|
2020-09-03 23:08:22 -04:00
|
|
|
},
|
2020-12-23 19:10:25 -05:00
|
|
|
render: (createElement) => createElement(InviteMembersBanner),
|
2020-09-03 23:08:22 -04:00
|
|
|
});
|
|
|
|
}
|