summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/registry/index.js
blob: 4f7895897b2043f4b170eccee22d2096ccf2f742 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import Vue from 'vue';
import Translate from '../vue_shared/translate';
import registryApp from './components/app.vue';

// Vue.use(Translate);

document.addEventListener('DOMContentLoaded', () => new Vue({
  el: '#js-vue-registry-images',
  components: {
    registryApp,
  },
  data() {
    const dataset = document.querySelector(this.$options.el).dataset;
    return {
      endpoint: dataset.endpoint,
    };
  },
  render(createElement) {
    return createElement('registry-app', {
      props: {
        endpoint: this.endpoint,
      },
    });
  },
}));