Commit 49a4fc13 by CalciumIon

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.
parent 8b54c475
...@@ -46,7 +46,6 @@ const LogsTable = () => { ...@@ -46,7 +46,6 @@ const LogsTable = () => {
const [isModalOpen, setIsModalOpen] = useState(false); const [isModalOpen, setIsModalOpen] = useState(false);
const [modalContent, setModalContent] = useState(''); const [modalContent, setModalContent] = useState('');
function renderType(type) { function renderType(type) {
const { t } = useTranslation();
switch (type) { switch (type) {
case 'IMAGINE': case 'IMAGINE':
...@@ -155,7 +154,6 @@ const LogsTable = () => { ...@@ -155,7 +154,6 @@ const LogsTable = () => {
} }
function renderCode(code) { function renderCode(code) {
const { t } = useTranslation();
switch (code) { switch (code) {
case 1: case 1:
...@@ -192,7 +190,6 @@ const LogsTable = () => { ...@@ -192,7 +190,6 @@ const LogsTable = () => {
} }
function renderStatus(type) { function renderStatus(type) {
const { t } = useTranslation();
switch (type) { switch (type) {
case 'SUCCESS': case 'SUCCESS':
...@@ -254,7 +251,6 @@ const LogsTable = () => { ...@@ -254,7 +251,6 @@ const LogsTable = () => {
}; };
// 修改renderDuration函数以包含颜色逻辑 // 修改renderDuration函数以包含颜色逻辑
function renderDuration(submit_time, finishTime) { function renderDuration(submit_time, finishTime) {
const { t } = useTranslation();
if (!submit_time || !finishTime) return 'N/A'; if (!submit_time || !finishTime) return 'N/A';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment