2020-09-04 03:08:22 +00: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-15 00:09:30 +00:00
|
|
|
const {
|
|
|
|
svgPath,
|
|
|
|
inviteMembersPath,
|
|
|
|
trackLabel,
|
|
|
|
calloutsPath,
|
|
|
|
calloutsFeatureId,
|
|
|
|
groupId,
|
|
|
|
} = el.dataset;
|
2020-09-04 03:08:22 +00:00
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
|
|
|
provide: {
|
|
|
|
svgPath,
|
|
|
|
inviteMembersPath,
|
2020-09-16 15:09:32 +00:00
|
|
|
trackLabel,
|
2021-09-15 00:09:30 +00:00
|
|
|
calloutsPath,
|
|
|
|
calloutsFeatureId,
|
|
|
|
groupId,
|
2020-09-04 03:08:22 +00:00
|
|
|
},
|
2020-12-24 00:10:25 +00:00
|
|
|
render: (createElement) => createElement(InviteMembersBanner),
|
2020-09-04 03:08:22 +00:00
|
|
|
});
|
|
|
|
}
|