summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/releases/mount_index.js
blob: a9538cbc9e5a0bb67a66355acbb3c828dc893bc8 (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
26
import Vue from 'vue';
import Vuex from 'vuex';
import ReleaseListApp from './components/app_index.vue';
import createStore from './stores';
import createListModule from './stores/modules/list';

Vue.use(Vuex);

export default () => {
  const el = document.getElementById('js-releases-page');

  return new Vue({
    el,
    store: createStore({
      modules: {
        list: createListModule(el.dataset),
      },
      featureFlags: {
        graphqlReleaseData: Boolean(gon.features?.graphqlReleaseData),
        graphqlReleasesPage: Boolean(gon.features?.graphqlReleasesPage),
        graphqlMilestoneStats: Boolean(gon.features?.graphqlMilestoneStats),
      },
    }),
    render: (h) => h(ReleaseListApp),
  });
};