mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-20 05:26:20 +00:00
Delegate tag color storage to ShlinkWebComponent consuming app
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Settings, ShlinkWebComponentType } from '@shlinkio/shlink-web-component';
|
||||
import type { Settings, ShlinkWebComponentType, TagColorsStorage } from '@shlinkio/shlink-web-component';
|
||||
import type { FC } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import type { ShlinkApiClientBuilder } from '../api/services/ShlinkApiClientBuilder';
|
||||
@@ -15,6 +15,7 @@ interface ShlinkWebComponentContainerProps {
|
||||
|
||||
export const ShlinkWebComponentContainer = (
|
||||
buildShlinkApiClient: ShlinkApiClientBuilder,
|
||||
tagColorsStorage: TagColorsStorage,
|
||||
ShlinkWebComponent: ShlinkWebComponentType,
|
||||
ServerError: FC,
|
||||
) => withSelectedServer<ShlinkWebComponentContainerProps>((
|
||||
@@ -38,6 +39,7 @@ export const ShlinkWebComponentContainer = (
|
||||
apiClient={buildShlinkApiClient(selectedServer)}
|
||||
settings={settings}
|
||||
routesPrefix={routesPrefix}
|
||||
tagColorsStorage={tagColorsStorage}
|
||||
createNotFound={(nonPrefixedHomePath) => (
|
||||
<NotFound to={`${routesPrefix}${nonPrefixedHomePath}`}>List short URLs</NotFound>
|
||||
)}
|
||||
|
||||
@@ -32,6 +32,7 @@ export const provideServices = (bottle: Bottle, connect: ConnectDecorator) => {
|
||||
'ShlinkWebComponentContainer',
|
||||
ShlinkWebComponentContainer,
|
||||
'buildShlinkApiClient',
|
||||
'TagColorsStorage',
|
||||
'ShlinkWebComponent',
|
||||
'ServerError',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user