mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-11 09:06:20 +00:00
Consolidate all service definitions in one module
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import { useTimeoutToggle } from '@shlinkio/shlink-frontend-kit';
|
||||
import type Bottle from 'bottlejs';
|
||||
import { csvToJson, jsonToCsv } from '../helpers/csvjson';
|
||||
import { LocalStorage } from './LocalStorage';
|
||||
import { TagColorsStorage } from './TagColorsStorage';
|
||||
|
||||
export const provideServices = (bottle: Bottle) => {
|
||||
bottle.constant('localStorage', window.localStorage);
|
||||
bottle.service('Storage', LocalStorage, 'localStorage');
|
||||
bottle.service('TagColorsStorage', TagColorsStorage, 'Storage');
|
||||
|
||||
bottle.constant('csvToJson', csvToJson);
|
||||
bottle.constant('jsonToCsv', jsonToCsv);
|
||||
|
||||
bottle.serviceFactory('useTimeoutToggle', () => useTimeoutToggle);
|
||||
};
|
||||
Reference in New Issue
Block a user