summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/admin/topics/index.js
blob: 8fbcadf33699e70d3d1230c97491b737ebff5c69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import Vue from 'vue';
import RemoveAvatar from './components/remove_avatar.vue';

export default () => {
  const el = document.querySelector('.js-remove-topic-avatar');

  if (!el) {
    return false;
  }

  const { path } = el.dataset;

  return new Vue({
    el,
    provide: {
      path,
    },
    render(h) {
      return h(RemoveAvatar);
    },
  });
};