Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/snippets/index.js')
-rw-r--r--app/assets/javascripts/snippets/index.js14
1 files changed, 2 insertions, 12 deletions
diff --git a/app/assets/javascripts/snippets/index.js b/app/assets/javascripts/snippets/index.js
index c70ad9b95f8..b55e1baf41e 100644
--- a/app/assets/javascripts/snippets/index.js
+++ b/app/assets/javascripts/snippets/index.js
@@ -3,20 +3,18 @@ import VueApollo from 'vue-apollo';
import Translate from '~/vue_shared/translate';
import createDefaultClient from '~/lib/graphql';
-import SnippetsShow from './components/show.vue';
-import SnippetsEdit from './components/edit.vue';
import { SNIPPET_LEVELS_MAP, SNIPPET_VISIBILITY_PRIVATE } from '~/snippets/constants';
Vue.use(VueApollo);
Vue.use(Translate);
-function appFactory(el, Component) {
+export default function appFactory(el, Component) {
if (!el) {
return false;
}
const apolloProvider = new VueApollo({
- defaultClient: createDefaultClient(),
+ defaultClient: createDefaultClient({}, { batchMax: 1 }),
});
const {
@@ -46,11 +44,3 @@ function appFactory(el, Component) {
},
});
}
-
-export const SnippetShowInit = () => {
- appFactory(document.getElementById('js-snippet-view'), SnippetsShow);
-};
-
-export const SnippetEditInit = () => {
- appFactory(document.getElementById('js-snippet-edit'), SnippetsEdit);
-};