summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/shared/wikis/show.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pages/shared/wikis/show.js')
-rw-r--r--app/assets/javascripts/pages/shared/wikis/show.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/shared/wikis/show.js b/app/assets/javascripts/pages/shared/wikis/show.js
new file mode 100644
index 00000000000..9906cb595f8
--- /dev/null
+++ b/app/assets/javascripts/pages/shared/wikis/show.js
@@ -0,0 +1,27 @@
+import Vue from 'vue';
+import Wikis from './wikis';
+import WikiContent from './components/wiki_content.vue';
+
+const mountWikiContentApp = () => {
+ const el = document.querySelector('.js-async-wiki-page-content');
+
+ if (el) {
+ const { getWikiContentUrl } = el.dataset;
+
+ // eslint-disable-next-line no-new
+ new Vue({
+ el,
+ render(createElement) {
+ return createElement(WikiContent, {
+ props: { getWikiContentUrl },
+ });
+ },
+ });
+ }
+};
+
+export const mountApplications = () => {
+ // eslint-disable-next-line no-new
+ new Wikis();
+ mountWikiContentApp();
+};