debian-mirror-gitlab/app/assets/javascripts/projects/merge_requests/index.js
2023-03-17 16:20:25 +05:30

18 lines
511 B
JavaScript

import Vue from 'vue';
import ReportAbuseDropdownItem from './components/report_abuse_dropdown_item.vue';
export const initReportAbuse = () => {
const el = document.getElementById('js-report-abuse-dropdown-item');
if (!el) return false;
const { reportAbusePath, reportedUserId, reportedFromUrl } = el.dataset;
return new Vue({
el,
provide: { reportAbusePath, reportedUserId, reportedFromUrl },
render(createElement) {
return createElement(ReportAbuseDropdownItem);
},
});
};