blob: 37f8e3ac471614ca5c707c106281aa505832d392 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import Vue from 'vue';
import ReportAbuseButton from './components/report_abuse_button.vue';
export const initReportAbuse = () => {
const el = document.getElementById('js-report-abuse');
if (!el) return false;
const { reportAbusePath, reportedUserId, reportedFromUrl } = el.dataset;
return new Vue({
el,
provide: { reportAbusePath, reportedUserId, reportedFromUrl },
render(createElement) {
return createElement(ReportAbuseButton);
},
});
};
|