Pārlūkot izejas kodu

:globe_with_meridians: 查字典

visuddhinanda 2 gadi atpakaļ
vecāks
revīzija
c9051ee63f
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      dashboard/src/components/exp/ExpStatisticCard.tsx

+ 5 - 1
dashboard/src/components/exp/ExpStatisticCard.tsx

@@ -1,6 +1,7 @@
 import { StatisticCard } from "@ant-design/pro-components";
 import { message } from "antd";
 import { useEffect, useState } from "react";
+import { useIntl } from "react-intl";
 import { get } from "../../request";
 import { IUserStatisticResponse } from "../api/Exp";
 import ExpPie, { IPieData } from "./ExpPie";
@@ -11,6 +12,7 @@ interface IWidget {
   studioName?: string;
 }
 const ExpStatisticCardWidget = ({ studioName }: IWidget) => {
+  const intl = useIntl();
   const [expSum, setExpSum] = useState<number>();
   const [wbwCount, setWbwCount] = useState<number>();
   const [lookupCount, setLookupCount] = useState<number>();
@@ -71,7 +73,9 @@ const ExpStatisticCardWidget = ({ studioName }: IWidget) => {
       />
       <StatisticCard
         statistic={{
-          title: "查字典",
+          title: intl.formatMessage({
+            id: "buttons.lookup",
+          }),
           value: lookupCount,
           suffix: "次",
         }}