mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-02 13:51:48 +00:00
17 lines
655 B
TypeScript
17 lines
655 B
TypeScript
import Bottle from 'bottlejs';
|
|
import { useStateFlagTimeout } from '../helpers/hooks';
|
|
import LocalStorage from './LocalStorage';
|
|
import ColorGenerator from './ColorGenerator';
|
|
|
|
const provideServices = (bottle: Bottle) => {
|
|
bottle.constant('localStorage', (global as any).localStorage);
|
|
bottle.service('Storage', LocalStorage, 'localStorage');
|
|
bottle.service('ColorGenerator', ColorGenerator, 'Storage');
|
|
|
|
bottle.constant('setTimeout', global.setTimeout);
|
|
bottle.constant('clearTimeout', global.clearTimeout);
|
|
bottle.serviceFactory('useStateFlagTimeout', useStateFlagTimeout, 'setTimeout', 'clearTimeout');
|
|
};
|
|
|
|
export default provideServices;
|