diff --git a/kraken-app/kraken-app-portal/src/pages/EnvironmentActivityLog/components/PushHistoryModal/index.tsx b/kraken-app/kraken-app-portal/src/pages/EnvironmentActivityLog/components/PushHistoryModal/index.tsx index fbf85f2f..4eed749c 100644 --- a/kraken-app/kraken-app-portal/src/pages/EnvironmentActivityLog/components/PushHistoryModal/index.tsx +++ b/kraken-app/kraken-app-portal/src/pages/EnvironmentActivityLog/components/PushHistoryModal/index.tsx @@ -1,6 +1,6 @@ import { DatePicker, Flex, Form, Modal, Radio, Spin } from "antd"; import styles from "./index.module.scss"; -import { useCallback } from "react"; +import { useCallback, useMemo } from "react"; import { capitalize } from 'lodash'; import dayjs from 'dayjs'; import { useGetProductEnvActivitiesMutation } from '@/hooks/product'; @@ -76,6 +76,11 @@ const PushHistoryModal = ({ [] ); + const isFormValid = useMemo(() => { + const { envId, requestTime } = form.getFieldsValue(); + return !!(responseData && responseData.data.total > 0 && envId && requestTime) + }, [responseData, form]) + return (
- + - {responseData?.data?.total && + {responseData?.data &&
Number of activity logs filtered
@@ -124,8 +132,6 @@ const PushHistoryModal = ({ }
- -
);