mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-18 05:23:49 +00:00
Created component to allow selecting from existing domains list
This commit is contained in:
15
src/domains/services/provideServices.ts
Normal file
15
src/domains/services/provideServices.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import Bottle from 'bottlejs';
|
||||
import { ConnectDecorator } from '../../container/types';
|
||||
import { listDomains } from '../reducers/domainsList';
|
||||
import { DomainsDropdown } from '../DomainsDropdown';
|
||||
|
||||
const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
|
||||
// Components
|
||||
bottle.serviceFactory('DomainsDropdown', () => DomainsDropdown);
|
||||
bottle.decorator('DomainsDropdown', connect([ 'domainsList' ], [ 'listDomains' ]));
|
||||
|
||||
// Actions
|
||||
bottle.serviceFactory('listDomains', listDomains, 'buildShlinkApiClient');
|
||||
};
|
||||
|
||||
export default provideServices;
|
||||
Reference in New Issue
Block a user