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