diff options
Diffstat (limited to 'app/assets/javascripts/abuse_reports/index.js')
-rw-r--r-- | app/assets/javascripts/abuse_reports/index.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/assets/javascripts/abuse_reports/index.js b/app/assets/javascripts/abuse_reports/index.js new file mode 100644 index 00000000000..fff4ad8daa0 --- /dev/null +++ b/app/assets/javascripts/abuse_reports/index.js @@ -0,0 +1,22 @@ +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), + }, + }); + }, + }); +}; |