diff --git a/client/app/factory/edit/components/DeployBotModal/index.tsx b/client/app/factory/edit/components/DeployBotModal/index.tsx index d69ae244..249498b4 100644 --- a/client/app/factory/edit/components/DeployBotModal/index.tsx +++ b/client/app/factory/edit/components/DeployBotModal/index.tsx @@ -41,6 +41,7 @@ const MyBotDeployModal: React.FC = ({ isOpen, onClose }) => { } = useBindBotToRepo(); const { publicBot, + data: publicBotResult, isLoading: isPublicBotLoading, isSuccess: isPublicBotSuccess, } = usePublicBot(); @@ -51,6 +52,7 @@ const MyBotDeployModal: React.FC = ({ isOpen, onClose }) => { } = useUnPublicBot(); const { deployWebsite, + data: deployWebsiteResult, isLoading: isDeployWebsiteLoading, isSuccess: isDeployWebsiteSuccess, } = useDeployWebsite(); @@ -75,10 +77,11 @@ const MyBotDeployModal: React.FC = ({ isOpen, onClose }) => { checked: !!botProfile.domain_whitelist[0], targetUrl: botProfile.domain_whitelist[0], }, - appInstalledRepo: peterCatBotRepos?.map((item: any) => ({ - repo_id: item.repo_id, - checked: item.robot_id === botProfile.id, - }))??[], + appInstalledRepo: + peterCatBotRepos?.map((item: any) => ({ + repo_id: item.repo_id, + checked: item.robot_id === botProfile.id, + })) ?? [], }; }, [botProfile, peterCatBotRepos]); @@ -148,6 +151,24 @@ const MyBotDeployModal: React.FC = ({ isOpen, onClose }) => { isDeployWebsiteSuccess || isBindBotSuccess; + const renderResultPath = (result: { approval_path: any }, text: string) => { + return ( + <> + {result?.approval_path ? ( +
+ + {text} + {I18N.DeployBotModal.DeployContent.shenHeZhong} + + + {result.approval_path} + +
+ ) : null} + + ); + }; + return ( <> = ({ isOpen, onClose }) => { {I18N.DeployBotModal.index.buShuChengGong} + + {renderResultPath( + publicBotResult, + I18N.DeployBotModal.DeployContent.gongKaiDaoPE, + )} + {renderResultPath( + deployWebsiteResult, + I18N.DeployBotModal.DeployContent.buShuDaoWoDe, + )} +