summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/admin/cohorts/index.js
blob: 1cc54df15a1af6f1af109435fc076ca005fa77c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import Vue from 'vue';
import UsagePingDisabled from '~/admin/cohorts/components/usage_ping_disabled.vue';

document.addEventListener('DOMContentLoaded', () => {
  const emptyStateContainer = document.getElementById('js-cohorts-empty-state');

  if (!emptyStateContainer) return false;

  const { emptyStateSvgPath, enableUsagePingLink, docsLink } = emptyStateContainer.dataset;

  return new Vue({
    el: emptyStateContainer,
    provide: {
      svgPath: emptyStateSvgPath,
      primaryButtonPath: enableUsagePingLink,
      docsLink,
    },
    render(h) {
      return h(UsagePingDisabled);
    },
  });
});