diff --git a/src/client/components/website/MetricsTable.tsx b/src/client/components/website/MetricsTable.tsx index 0a271a4..d31e4d4 100644 --- a/src/client/components/website/MetricsTable.tsx +++ b/src/client/components/website/MetricsTable.tsx @@ -5,6 +5,7 @@ import { AppRouterOutput, trpc } from '../../api/trpc'; import { useCurrentWorkspaceId } from '../../store/user'; import { sum } from 'lodash-es'; import { formatNumber } from '../../utils/common'; +import { useTranslation } from '@i18next-toolkit/react'; type MetricsItemType = AppRouterOutput['website']['metrics'][number]; @@ -24,8 +25,9 @@ interface MetricsTableProps { endAt: number; } export const MetricsTable: React.FC = React.memo((props) => { - const workspaceId = useCurrentWorkspaceId(); const { websiteId, title, type, startAt, endAt } = props; + const workspaceId = useCurrentWorkspaceId(); + const { t } = useTranslation(); const { isLoading, data: metrics = [] } = trpc.website.metrics.useQuery({ workspaceId, diff --git a/src/client/i18next-toolkit.config.ts b/src/client/i18next-toolkit.config.js similarity index 87% rename from src/client/i18next-toolkit.config.ts rename to src/client/i18next-toolkit.config.js index a9bcbc7..c60da85 100644 --- a/src/client/i18next-toolkit.config.ts +++ b/src/client/i18next-toolkit.config.js @@ -1,6 +1,5 @@ -import type { I18nextToolkitConfig } from '@i18next-toolkit/cli'; - -export default { +/** @type {import('@i18next-toolkit/cli').I18nextToolkitConfig} */ +const config = { locales: ['en', 'zh', 'jp', 'fr', 'de', 'ru'], scanner: { verbose: false, @@ -41,4 +40,6 @@ export default { 'YYYY-MM-DD HH:mm', ], }, -} satisfies I18nextToolkitConfig; +}; + +module.exports = config;