summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/static_site_editor/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/static_site_editor/index.js')
-rw-r--r--app/assets/javascripts/static_site_editor/index.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/static_site_editor/index.js b/app/assets/javascripts/static_site_editor/index.js
index fe5d11f1bd9..b53d461f5a9 100644
--- a/app/assets/javascripts/static_site_editor/index.js
+++ b/app/assets/javascripts/static_site_editor/index.js
@@ -1,10 +1,11 @@
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
-import StaticSiteEditor from './components/static_site_editor.vue';
+import App from './components/app.vue';
import createStore from './store';
+import createRouter from './router';
const initStaticSiteEditor = el => {
- const { isSupportedContent, projectId, path: sourcePath, returnUrl } = el.dataset;
+ const { isSupportedContent, projectId, path: sourcePath, returnUrl, baseUrl } = el.dataset;
const store = createStore({
initialState: {
@@ -15,15 +16,17 @@ const initStaticSiteEditor = el => {
username: window.gon.current_username,
},
});
+ const router = createRouter(baseUrl);
return new Vue({
el,
store,
+ router,
components: {
- StaticSiteEditor,
+ App,
},
render(createElement) {
- return createElement('static-site-editor', StaticSiteEditor);
+ return createElement('app');
},
});
};