summaryrefslogtreecommitdiff
path: root/src/components/Rules.tsx
diff options
context:
space:
mode:
authorHaishan <[email protected]>2020-12-06 14:57:59 +0800
committerHaishan <[email protected]>2020-12-06 20:19:51 +0800
commit8a50ef4ef2f6f6044d36ea2f4fe06e663083972e (patch)
treeda098c1434b5f745f391330dde37b6468deec45b /src/components/Rules.tsx
parenta8c6cd23ce2b585362f515080b2167990c554fed (diff)
feat: initial Chinese UI language support
Diffstat (limited to 'src/components/Rules.tsx')
-rw-r--r--src/components/Rules.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/Rules.tsx b/src/components/Rules.tsx
index dab479c..008ce3c 100644
--- a/src/components/Rules.tsx
+++ b/src/components/Rules.tsx
@@ -1,5 +1,6 @@
import React from 'react';
import { RotateCw } from 'react-feather';
+import { useTranslation } from 'react-i18next';
import { queryCache, useQuery } from 'react-query';
import { areEqual, VariableSizeList } from 'react-window';
import { useRecoilState } from 'recoil';
@@ -114,10 +115,12 @@ function Rules({ apiConfig }) {
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type '{ rules: RuleItem[]; provider: {... Remove this comment to see the full error message
const getItemSize = getItemSizeFactory({ rules, provider });
+ const { t } = useTranslation();
+
return (
<div>
<div className={s.header}>
- <ContentHeader title="Rules" />
+ <ContentHeader title={t('Rules')} />
<TextFilter />
</div>
{/* @ts-expect-error ts-migrate(2322) FIXME: Type 'number | MutableRefObject<any>' is not assig... Remove this comment to see the full error message */}