summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/projects/terraform_notification/index.js
blob: eb04f109a8e88655f2477caa2df368533074e88c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Vue from 'vue';
import TerraformNotification from './components/terraform_notification.vue';

export default () => {
  const el = document.querySelector('.js-terraform-notification');

  if (!el) {
    return false;
  }

  const { projectId } = el.dataset;

  return new Vue({
    el,
    render: (createElement) =>
      createElement(TerraformNotification, { props: { projectId: Number(projectId) } }),
  });
};