debian-mirror-gitlab/app/assets/javascripts/projects/terraform_notification/index.js
2021-11-11 11:23:49 +05:30

29 lines
637 B
JavaScript

import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import TerraformNotification from './components/terraform_notification.vue';
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(),
});
export default () => {
const el = document.querySelector('.js-terraform-notification');
if (!el) {
return false;
}
const { terraformImagePath } = el.dataset;
return new Vue({
el,
apolloProvider,
provide: {
terraformImagePath,
},
render: (createElement) => createElement(TerraformNotification),
});
};