fix: unexpected redirection when landing at workflow (#22932)
This commit is contained in:
@@ -82,6 +82,7 @@ import { supportFunctionCall } from '@/utils/tool-call'
|
||||
import { MittProvider } from '@/context/mitt-context'
|
||||
import { fetchAndMergeValidCompletionParams } from '@/utils/completion-params'
|
||||
import Toast from '@/app/components/base/toast'
|
||||
import { useAppContext } from '@/context/app-context'
|
||||
|
||||
type PublishConfig = {
|
||||
modelConfig: ModelConfig
|
||||
@@ -91,6 +92,8 @@ type PublishConfig = {
|
||||
const Configuration: FC = () => {
|
||||
const { t } = useTranslation()
|
||||
const { notify } = useContext(ToastContext)
|
||||
const { isLoadingCurrentWorkspace, currentWorkspace } = useAppContext()
|
||||
|
||||
const { appDetail, showAppConfigureFeaturesModal, setAppSiderbarExpand, setShowAppConfigureFeaturesModal } = useAppStore(useShallow(state => ({
|
||||
appDetail: state.appDetail,
|
||||
setAppSiderbarExpand: state.setAppSiderbarExpand,
|
||||
@@ -693,7 +696,6 @@ const Configuration: FC = () => {
|
||||
setHasFetchedDetail(true)
|
||||
})
|
||||
})()
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [appId])
|
||||
|
||||
const promptEmpty = (() => {
|
||||
@@ -843,7 +845,7 @@ const Configuration: FC = () => {
|
||||
setAppSiderbarExpand('collapse')
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
if (isLoading || isLoadingCurrentWorkspace || !currentWorkspace.id) {
|
||||
return <div className='flex h-full items-center justify-center'>
|
||||
<Loading type='area' />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user