Commit 57749eca authored by Clement Ho's avatar Clement Ho

Refactor dispatcher milestones show path

parent 10a246b6
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */
import Milestone from './milestone';
import notificationsDropdown from './notifications_dropdown'; import notificationsDropdown from './notifications_dropdown';
import LineHighlighter from './line_highlighter'; import LineHighlighter from './line_highlighter';
import MergeRequest from './merge_request'; import MergeRequest from './merge_request';
import Sidebar from './right_sidebar';
import Flash from './flash'; import Flash from './flash';
import BlobViewer from './blob/viewer/index'; import BlobViewer from './blob/viewer/index';
import GfmAutoComplete from './gfm_auto_complete'; import GfmAutoComplete from './gfm_auto_complete';
...@@ -92,9 +90,14 @@ import SearchAutocomplete from './search_autocomplete'; ...@@ -92,9 +90,14 @@ import SearchAutocomplete from './search_autocomplete';
.catch(fail); .catch(fail);
break; break;
case 'projects:milestones:show': case 'projects:milestones:show':
import('./pages/projects/milestones/show')
.then(callDefault)
.catch(fail);
break;
case 'groups:milestones:show': case 'groups:milestones:show':
new Milestone(); import('./pages/groups/milestones/show')
new Sidebar(); .then(callDefault)
.catch(fail);
break; break;
case 'dashboard:milestones:show': case 'dashboard:milestones:show':
import('./pages/dashboard/milestones/show') import('./pages/dashboard/milestones/show')
......
import initMilestonesShow from '~/pages/init_milestones_show';
export default initMilestonesShow;
/* eslint-disable no-new */
import Milestone from '~/milestone';
import Sidebar from '~/right_sidebar';
export default () => {
new Milestone();
new Sidebar();
};
import initMilestonesShow from '~/pages/init_milestones_show';
export default initMilestonesShow;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment