blob: 196084093c83604673cbc41253f533805b3aceb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import Vue from 'vue';
import RelatedMergeRequests from './components/related_merge_requests.vue';
import createStore from './store';
export function initRelatedMergeRequests() {
const el = document.querySelector('#js-related-merge-requests');
if (!el) {
return undefined;
}
const { endpoint, projectPath, projectNamespace } = el.dataset;
return new Vue({
el,
name: 'RelatedMergeRequestsRoot',
store: createStore(),
render: (createElement) =>
createElement(RelatedMergeRequests, {
props: { endpoint, projectNamespace, projectPath },
}),
});
}
|