error track

This commit is contained in:
archer
2023-09-03 18:26:36 +08:00
parent e0b23a26f2
commit 1ace8fb9a3
4 changed files with 38 additions and 6 deletions

View File

@@ -6,6 +6,8 @@ import axios from 'axios';
type LoginStoreType = { provider: 'git'; lastRoute: string };
type State = {
lastRoute: string;
setLastRoute: (e: string) => void;
loginStore?: LoginStoreType;
setLoginStore: (e: LoginStoreType) => void;
loading: boolean;
@@ -22,6 +24,12 @@ export const useGlobalStore = create<State>()(
devtools(
persist(
immer((set, get) => ({
lastRoute: '/app/list',
setLastRoute(e) {
set((state) => {
state.lastRoute = e;
});
},
loginStore: undefined,
setLoginStore(e) {
set((state) => {