feat: app detail

This commit is contained in:
archer
2023-07-13 15:07:13 +08:00
parent 6c72c20317
commit b4d46ff34d
47 changed files with 1088 additions and 1091 deletions

View File

@@ -17,14 +17,13 @@ const Login = () => {
const { lastRoute = '' } = router.query as { lastRoute: string };
const { isPc } = useGlobalStore();
const [pageType, setPageType] = useState<`${PageTypeEnum}`>(PageTypeEnum.login);
const { setUserInfo, setLastModelId, loadKbList, setLastKbId } = useUserStore();
const { setLastChatId, setLastChatAppId } = useChatStore();
const { setUserInfo, loadKbList, setLastKbId } = useUserStore();
const { setLastHistoryId, setLastChatAppId } = useChatStore();
const loginSuccess = useCallback(
(res: ResLogin) => {
// init store
setLastChatId('');
setLastModelId('');
setLastHistoryId('');
setLastChatAppId('');
setLastKbId('');
loadKbList(true);
@@ -34,16 +33,7 @@ const Login = () => {
router.push(lastRoute ? decodeURIComponent(lastRoute) : '/model');
}, 100);
},
[
lastRoute,
loadKbList,
router,
setLastChatId,
setLastChatAppId,
setLastKbId,
setLastModelId,
setUserInfo
]
[lastRoute, loadKbList, router, setLastHistoryId, setLastChatAppId, setLastKbId, setUserInfo]
);
function DynamicComponent({ type }: { type: `${PageTypeEnum}` }) {