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
commit 2c51e3a327
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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)