Просмотр исходного кода

Refactor NewUserReportPage for improved code clarity and consistency

- Streamlined the loading summary function by consolidating parameters into a single line for better readability.
- Simplified the rendering of the report title and description, enhancing the overall presentation.
- Cleaned up unnecessary import statements to maintain a tidy codebase.
0es 1 неделя назад
Родитель
Сommit
d9d0cbea5b
1 измененных файлов с 3 добавлено и 10 удалено
  1. 3 10
      src/app/(dashboard)/statistics/new-user/page.tsx

+ 3 - 10
src/app/(dashboard)/statistics/new-user/page.tsx

@@ -1,8 +1,6 @@
 "use client";
 
-import {
-  ReloadOutlined,
-} from "@ant-design/icons";
+import { ReloadOutlined } from "@ant-design/icons";
 import {
   App,
   Button,
@@ -91,10 +89,7 @@ const NewUserReportPage: React.FC = () => {
     async (params: typeof filterParams) => {
       setLoading(true);
       try {
-        await loadSummary(
-          params.startDay,
-          params.endDay,
-        );
+        await loadSummary(params.startDay, params.endDay);
       } finally {
         setLoading(false);
       }
@@ -120,9 +115,7 @@ const NewUserReportPage: React.FC = () => {
           <Title level={3} style={{ marginBottom: 0 }}>
             新用户报表
           </Title>
-          <Text type="secondary">
-            新用户承接策略报表(最近 7 天)
-          </Text>
+          <Text type="secondary">新用户承接策略报表</Text>
         </div>
         <Button
           icon={<ReloadOutlined />}