fix: webapp sso setting may not the latest value when refresh (#7795)

This commit is contained in:
NFish
2024-08-29 15:57:43 +08:00
committed by GitHub
parent 8e311cc45c
commit 2c51e3a327
3 changed files with 6 additions and 7 deletions

View File

@@ -128,7 +128,7 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
if (e.status === 404)
router.replace('/apps')
})
}, [appId, isCurrentWorkspaceEditor])
}, [appId, isCurrentWorkspaceEditor, systemFeatures])
useUnmount(() => {
setAppDetail()

View File

@@ -95,7 +95,7 @@ const CardView: FC<ICardViewProps> = ({ appId }) => {
if (systemFeatures.enable_web_sso_switch_component) {
const [sso_err] = await asyncRunSafe<AppSSO>(
updateAppSSO({ id: appId, enabled: params.enable_sso }) as Promise<AppSSO>,
updateAppSSO({ id: appId, enabled: Boolean(params.enable_sso) }) as Promise<AppSSO>,
)
if (sso_err) {
handleCallbackResult(sso_err)