refactor(ui): clean code

This commit is contained in:
Fu Diwei
2024-12-25 23:20:09 +08:00
parent adbf40914e
commit 1184e52ba9
30 changed files with 267 additions and 233 deletions

View File

@@ -1,4 +1,4 @@
import { useEffect, useState } from "react";
import { memo, useEffect, useState } from "react";
import { Link } from "react-router";
import { useTranslation } from "react-i18next";
import { useDeepCompareEffect } from "ahooks";
@@ -18,11 +18,11 @@ export type NotifyNodeFormProps = {
data: WorkflowNode;
};
const initFormModel = () => {
const initFormModel = (): WorkflowNodeConfig => {
return {
subject: "",
message: "",
} as WorkflowNodeConfig;
};
};
const NotifyNodeForm = ({ data }: NotifyNodeFormProps) => {
@@ -115,4 +115,4 @@ const NotifyNodeForm = ({ data }: NotifyNodeFormProps) => {
);
};
export default NotifyNodeForm;
export default memo(NotifyNodeForm);