Moved Shlink API services to api module

This commit is contained in:
Alejandro Celaya
2020-12-22 09:55:39 +01:00
parent 8c6eaf2f1d
commit b2abfd543e
35 changed files with 43 additions and 40 deletions

View File

@@ -1,3 +1,4 @@
import axios from 'axios';
import Bottle, { Decorator } from 'bottlejs';
import ScrollToTop from '../ScrollToTop';
import MainHeader from '../MainHeader';
@@ -12,6 +13,7 @@ import { withoutSelectedServer } from '../../servers/helpers/withoutSelectedServ
const provideServices = (bottle: Bottle, connect: ConnectDecorator, withRouter: Decorator) => {
bottle.constant('window', (global as any).window);
bottle.constant('console', global.console);
bottle.constant('axios', axios);
bottle.serviceFactory('ScrollToTop', ScrollToTop);
bottle.decorator('ScrollToTop', withRouter);