Consolidate all service definitions in one module

This commit is contained in:
Alejandro Celaya
2025-11-15 10:33:42 +01:00
parent 373f0dbbbb
commit 4b655761c6
6 changed files with 50 additions and 79 deletions

View File

@@ -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);
};