fix: i18n tsc

This commit is contained in:
Ibrahima G. Coulibaly
2025-07-15 19:42:34 +01:00
parent a0bb24c520
commit e7ac590023
7 changed files with 124 additions and 79 deletions

View File

@@ -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}

View File

@@ -144,7 +144,7 @@ const categoriesConfig: {
export const filterTools = (
tools: DefinedTool[],
query: string,
t: TFunction<I18nNamespaces>
t: TFunction<I18nNamespaces[]>
): DefinedTool[] => {
if (!query) return tools;