From 68b7e0e96a54691a717b14e67eaa344a80a391da Mon Sep 17 00:00:00 2001 From: CalciumIon <1808837298@qq.com> Date: Fri, 13 Dec 2024 22:34:10 +0800 Subject: [PATCH] refactor: Remove unused translation function calls in LogsTable component - Eliminated unnecessary calls to the translation function in the LogsTable component, streamlining the code and improving performance. - This change enhances readability and reduces potential overhead from unused localization logic. --- web/src/components/MjLogsTable.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web/src/components/MjLogsTable.js b/web/src/components/MjLogsTable.js index 9cfc288a..3cb46c85 100644 --- a/web/src/components/MjLogsTable.js +++ b/web/src/components/MjLogsTable.js @@ -46,7 +46,6 @@ const LogsTable = () => { const [isModalOpen, setIsModalOpen] = useState(false); const [modalContent, setModalContent] = useState(''); function renderType(type) { - const { t } = useTranslation(); switch (type) { case 'IMAGINE': @@ -155,7 +154,6 @@ const LogsTable = () => { } function renderCode(code) { - const { t } = useTranslation(); switch (code) { case 1: @@ -192,7 +190,6 @@ const LogsTable = () => { } function renderStatus(type) { - const { t } = useTranslation(); switch (type) { case 'SUCCESS': @@ -254,7 +251,6 @@ const LogsTable = () => { }; // 修改renderDuration函数以包含颜色逻辑 function renderDuration(submit_time, finishTime) { - const { t } = useTranslation(); if (!submit_time || !finishTime) return 'N/A';