fix:登录超时后没有用户名

perf/export-docx
Jimmy Liow 2 years ago
parent 3f4fcc3789
commit 9008ae8511

@ -126,11 +126,16 @@ const useAuthStore = create((set, get) => ({
},
logout: () => {
const { tokenInterval } = get()
const { tokenInterval, currentUser } = get()
const { clearStorage } = usingStorage()
clearStorage()
clearInterval(tokenInterval)
set(initialState)
set(() => ({
...initialState,
currentUser: {
username: currentUser.username
}
}))
},
startTokenInterval: () => {

Loading…
Cancel
Save