fix: webapp variable input & app unavailable status (#2405)

This commit is contained in:
zxhlyh
2024-02-06 13:43:09 +08:00
committed by GitHub
parent 843280f82b
commit d8de2017b5
5 changed files with 87 additions and 22 deletions

View File

@@ -40,7 +40,7 @@ import { changeLanguage } from '@/i18n/i18next-config'
export const useChatWithHistory = (installedAppInfo?: InstalledApp) => {
const isInstalledApp = useMemo(() => !!installedAppInfo, [installedAppInfo])
const { data: appInfo, isLoading: appInfoLoading } = useSWR(installedAppInfo ? null : 'appInfo', fetchAppInfo)
const { data: appInfo, isLoading: appInfoLoading, error: appInfoError } = useSWR(installedAppInfo ? null : 'appInfo', fetchAppInfo)
const appData = useMemo(() => {
if (isInstalledApp) {
@@ -350,6 +350,7 @@ export const useChatWithHistory = (installedAppInfo?: InstalledApp) => {
}, [isInstalledApp, appId, t, notify])
return {
appInfoError,
appInfoLoading,
isInstalledApp,
appId,