fix: incorrect settings page navigate (#72)

This commit is contained in:
仓鼠
2024-12-23 19:18:39 +08:00
committed by GitHub
parent 5e3db19ed6
commit b9cee057f0
2 changed files with 1 additions and 3 deletions

View File

@@ -35,6 +35,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
try {
await loginRequest(username, password)
const user = await getProfile()
user.role = user.role || 0
setProfile(user)
navigate("/dashboard")
} catch (error: any) {