Fix(Tool): Fix the bug that can not load when switch between two tools
Fix the bug that can not load when switch between two tools. Optimize navigate when can not find tool.
This commit is contained in:
@@ -62,9 +62,7 @@ const Code = () => {
|
||||
break
|
||||
case DATABASE_NO_RECORD_FOUND:
|
||||
void message.error('未找到指定工具')
|
||||
setTimeout(() => {
|
||||
navigateToRepository(navigate)
|
||||
}, 3000)
|
||||
navigateToRepository(navigate)
|
||||
break
|
||||
default:
|
||||
void message.error('获取工具信息失败,请稍后重试')
|
||||
@@ -78,7 +76,7 @@ const Code = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getTool()
|
||||
}, [])
|
||||
}, [id])
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -51,9 +51,7 @@ const Execute = () => {
|
||||
break
|
||||
case DATABASE_NO_RECORD_FOUND:
|
||||
void message.error('未找到指定工具')
|
||||
setTimeout(() => {
|
||||
navigateToTools(navigate)
|
||||
}, 3000)
|
||||
navigateToTools(navigate)
|
||||
break
|
||||
default:
|
||||
void message.error('获取工具信息失败,请稍后重试')
|
||||
@@ -67,7 +65,7 @@ const Execute = () => {
|
||||
|
||||
useEffect(() => {
|
||||
getTool()
|
||||
}, [])
|
||||
}, [id])
|
||||
|
||||
return (
|
||||
<FitFullscreen data-component={'system-tools-execute'}>
|
||||
|
||||
Reference in New Issue
Block a user