diff --git a/projects/app/src/pageComponents/chat/SliderApps.tsx b/projects/app/src/pageComponents/chat/SliderApps.tsx index 505b31996ddb..ccc72ae62c89 100644 --- a/projects/app/src/pageComponents/chat/SliderApps.tsx +++ b/projects/app/src/pageComponents/chat/SliderApps.tsx @@ -53,11 +53,12 @@ const SliderApps = ({ apps, activeAppId }: { apps: AppListItemType[]; activeAppI return ( - + - {t('common:core.chat.Recent use')} + {t('common:core.chat.Recent use')} - + {userInfo ? ( diff --git a/projects/app/src/pages/chat/index.tsx b/projects/app/src/pages/chat/index.tsx index f1a2fd8f77a5..fdf1267d39ad 100644 --- a/projects/app/src/pages/chat/index.tsx +++ b/projects/app/src/pages/chat/index.tsx @@ -51,26 +51,25 @@ const useChatHook = (appId: string) => { const [isInitedUser, setIsIntedUser] = useState(false); // get app list - const { - data: myApps = [], - runAsync: loadMyApps, - loading: isLoadingApps - } = useRequest2(() => getMyApps({ getRecentlyChat: true }), { - manual: false, - refreshDeps: [userInfo], - errorToast: '', - async onSuccess(apps) { - // if no appId and there are available apps, automatically jump to the first app - if (!appId && apps.length > 0) { - router.replace({ - query: { - ...router.query, - appId: lastChatAppId || apps[0]._id - } - }); + const { data: myApps = [], loading: isLoadingApps } = useRequest2( + () => getMyApps({ getRecentlyChat: true }), + { + manual: false, + refreshDeps: [userInfo], + errorToast: '', + async onSuccess(apps) { + // if no appId and there are available apps, automatically jump to the first app + if (!appId && apps.length > 0) { + router.replace({ + query: { + ...router.query, + appId: lastChatAppId || apps[0]._id + } + }); + } } } - }); + ); // initialize user info useMount(async () => {