debian-mirror-gitlab/app/assets/javascripts/abuse_reports/index.js
2023-04-23 21:23:45 +05:30

22 lines
478 B
JavaScript

import Vue from 'vue';
import LinksToSpamInput from './components/links_to_spam_input.vue';
export const initLinkToSpam = () => {
const el = document.getElementById('js-links-to-spam');
if (!el) return false;
const { links } = el.dataset;
return new Vue({
el,
name: 'LinksToSpamRoot',
render(createElement) {
return createElement(LinksToSpamInput, {
props: {
previousLinks: JSON.parse(links),
},
});
},
});
};