4.8.5 perf app ui (#1845)

* list ui and layout

* rename token key

* app ui

* ssr
This commit is contained in:
Archer
2024-06-25 19:37:28 +08:00
committed by GitHub
parent c8bc9838e3
commit 9aa6fd4904
15 changed files with 10426 additions and 8254 deletions

View File

@@ -11,6 +11,7 @@ import Loading from '@fastgpt/web/components/common/MyLoading';
import { serviceSideProps } from '@/web/common/utils/i18n';
import { getErrText } from '@fastgpt/global/common/error/utils';
import { useTranslation } from 'next-i18next';
import { useMount } from 'ahooks';
const provider = ({ code, state, error }: { code: string; state: string; error?: string }) => {
const { t } = useTranslation();
@@ -51,6 +52,7 @@ const provider = ({ code, state, error }: { code: string; state: string; error?:
callbackUrl: `${location.origin}/login/provider`,
inviterId: localStorage.getItem('inviterId') || undefined
});
if (!res) {
toast({
status: 'warning',
@@ -74,7 +76,7 @@ const provider = ({ code, state, error }: { code: string; state: string; error?:
[loginStore, loginSuccess, router, toast]
);
useEffect(() => {
useMount(() => {
clearToken();
router.prefetch('/app/list');
if (error) {
@@ -98,7 +100,7 @@ const provider = ({ code, state, error }: { code: string; state: string; error?:
return;
}
authCode(code);
}, []);
});
return <Loading />;
};