mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-12-29 16:16:02 +00:00
fix: i18n tsc
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import ToolLayout from '../components/ToolLayout';
|
||||
import React, { JSXElementConstructor, LazyExoticComponent } from 'react';
|
||||
import { IconifyIcon } from '@iconify/react';
|
||||
import { FullI18nKey } from '../i18n';
|
||||
import { FullI18nKey, validNamespaces } from '../i18n';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export interface ToolMeta {
|
||||
@@ -63,7 +63,7 @@ export const defineTool = (
|
||||
shortDescription: i18n.shortDescription,
|
||||
keywords,
|
||||
component: function ToolComponent() {
|
||||
const { t } = useTranslation();
|
||||
const { t } = useTranslation(validNamespaces);
|
||||
return (
|
||||
<ToolLayout
|
||||
icon={icon}
|
||||
|
||||
@@ -144,7 +144,7 @@ const categoriesConfig: {
|
||||
export const filterTools = (
|
||||
tools: DefinedTool[],
|
||||
query: string,
|
||||
t: TFunction<I18nNamespaces>
|
||||
t: TFunction<I18nNamespaces[]>
|
||||
): DefinedTool[] => {
|
||||
if (!query) return tools;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user