Moved all visits-related services to its own service provide function inside visits

This commit is contained in:
Alejandro Celaya
2018-12-18 14:32:02 +01:00
parent 471322f4db
commit fa3e1eba93
9 changed files with 151 additions and 147 deletions

View File

@@ -45,6 +45,7 @@ import DeleteTagConfirmModal from '../tags/helpers/DeleteTagConfirmModal';
import { deleteTag, tagDeleted } from '../tags/reducers/tagDelete';
import EditTagModal from '../tags/helpers/EditTagModal';
import { editTag, tagEdited } from '../tags/reducers/tagEdit';
import provideVisitsServices from '../visits/container/provideServices';
const bottle = new Bottle();
const { container } = bottle;
@@ -70,7 +71,15 @@ bottle.decorator('MainHeader', withRouter);
bottle.serviceFactory('Home', () => Home);
bottle.decorator('Home', connectDecorator([ 'servers' ], { resetSelectedServer }));
bottle.serviceFactory('MenuLayout', MenuLayout, 'TagsList', 'ShortUrls', 'AsideMenu', 'CreateShortUrl');
bottle.serviceFactory(
'MenuLayout',
MenuLayout,
'TagsList',
'ShortUrls',
'AsideMenu',
'CreateShortUrl',
'ShortUrlVisits'
);
bottle.decorator('MenuLayout', connectDecorator([ 'selectedServer', 'shortUrlsListParams' ], { selectServer }));
bottle.decorator('MenuLayout', withRouter);
@@ -161,4 +170,6 @@ bottle.decorator('DeleteTagConfirmModal', connectDecorator([ 'tagDelete' ], { de
bottle.serviceFactory('EditTagModal', EditTagModal, 'ColorGenerator');
bottle.decorator('EditTagModal', connectDecorator([ 'tagEdit' ], { editTag, tagEdited }));
provideVisitsServices(bottle, connectDecorator);
export default container;