diff --git a/src/components/common/links/types.d.ts b/src/components/common/links/types.d.ts index 6a3a97a2b..dd69fbadc 100644 --- a/src/components/common/links/types.d.ts +++ b/src/components/common/links/types.d.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import type { StringMap, TOptionsBase } from 'i18next' +import type { TOptions } from 'i18next' import type { IconName } from '../fork-awesome/fork-awesome-icon' interface GeneralLinkProp { @@ -21,5 +21,5 @@ export interface LinkWithTextProps extends GeneralLinkProp { export interface TranslatedLinkProps extends GeneralLinkProp { i18nKey: string - i18nOption?: (TOptionsBase & StringMap) | string + i18nOption?: TOptions } diff --git a/src/components/notifications/ui-notification-boundary.tsx b/src/components/notifications/ui-notification-boundary.tsx index e4f1f91e3..28a47cc75 100644 --- a/src/components/notifications/ui-notification-boundary.tsx +++ b/src/components/notifications/ui-notification-boundary.tsx @@ -23,7 +23,7 @@ interface UiNotificationContext { dispatchOptions: Partial ) => void - showErrorNotification: (messageI18nKey: string, messageI18nOptions?: TOptions | string) => (error: Error) => void + showErrorNotification: (messageI18nKey: string, messageI18nOptions?: TOptions) => (error: Error) => void dismissNotification: (notificationUuid: string) => void } @@ -76,7 +76,7 @@ export const UiNotificationBoundary: React.FC = ({ children } ) const showErrorNotification = useCallback( - (messageI18nKey: string, messageI18nOptions?: TOptions | string) => + (messageI18nKey: string, messageI18nOptions?: TOptions) => (error: Error): void => { log.error(t(messageI18nKey, messageI18nOptions), error) void dispatchUiNotification('common.errorOccurred', messageI18nKey, {