From 062f10a25d43b875d187cf582b2ecf96d075ec26 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 25 Mar 2021 23:09:49 +0300 Subject: refactor: move services to separate folder --- src/services/index.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/services/index.ts (limited to 'src/services/index.ts') diff --git a/src/services/index.ts b/src/services/index.ts new file mode 100644 index 0000000..7f559f2 --- /dev/null +++ b/src/services/index.ts @@ -0,0 +1,20 @@ +import contractors from './contractors'; +import waybills from './waybills'; +import transfers from './transfers'; +import products from './products'; +import account from './account'; +import { registerServiceHooks } from '../hooks/useAPIClient'; +import { ServiceParams } from '../containers/Service/ServiceContext'; + +const services = [ + contractors, + products, + waybills, + transfers, + account, +] as ServiceParams[]; + +services.forEach((service: any) => registerServiceHooks(service.route)); + +export default services; + -- cgit v1.2.3