Updated ScrollTop component so that it gets the window object injected as a dependency

This commit is contained in:
Alejandro Celaya
2018-12-21 10:38:35 +01:00
parent 16cf30f26f
commit 047d99be6d
4 changed files with 9 additions and 11 deletions

View File

@@ -5,7 +5,9 @@ import MenuLayout from '../MenuLayout';
import AsideMenu from '../AsideMenu';
const provideServices = (bottle, connect, withRouter) => {
bottle.constant('ScrollToTop', ScrollToTop);
bottle.constant('window', global.window);
bottle.serviceFactory('ScrollToTop', ScrollToTop, 'window');
bottle.decorator('ScrollToTop', withRouter);
bottle.serviceFactory('MainHeader', MainHeader, 'ServersDropdown');