Refactor dispatcher search path

This commit is contained in:
Clement Ho 2018-01-10 12:32:29 -06:00
parent 82007530cb
commit 62928a3f12
3 changed files with 8 additions and 4 deletions

View file

@ -14,7 +14,6 @@ import GroupLabelSubscription from './group_label_subscription';
import LineHighlighter from './line_highlighter'; import LineHighlighter from './line_highlighter';
import BuildArtifacts from './build_artifacts'; import BuildArtifacts from './build_artifacts';
import groupsSelect from './groups_select'; import groupsSelect from './groups_select';
import Search from './search';
import initAdmin from './admin'; import initAdmin from './admin';
import NamespaceSelect from './namespace_select'; import NamespaceSelect from './namespace_select';
import NewCommitForm from './new_commit_form'; import NewCommitForm from './new_commit_form';
@ -528,7 +527,9 @@ import Activities from './activities';
VersionCheckImage.bindErrorEvent($('img.js-version-status-badge')); VersionCheckImage.bindErrorEvent($('img.js-version-status-badge'));
break; break;
case 'search:show': case 'search:show':
new Search(); import('./pages/search/show')
.then(callDefault)
.catch(fail);
break; break;
case 'projects:settings:repository:show': case 'projects:settings:repository:show':
// Initialize expandable settings panels // Initialize expandable settings panels

View file

@ -0,0 +1,3 @@
import Search from './search';
export default () => new Search();

View file

@ -1,5 +1,5 @@
import Flash from './flash'; import Flash from '~/flash';
import Api from './api'; import Api from '~/api';
export default class Search { export default class Search {
constructor() { constructor() {