feat: system tools and admin enhancements
All checks were successful
CI/CD Pipeline / test (push) Successful in 3s
CI/CD Pipeline / deploy (push) Successful in 20s

This commit is contained in:
2026-01-31 20:12:09 +01:00
parent 64244567c0
commit 9c60a8944e
31 changed files with 3088 additions and 173 deletions

View File

@@ -1,5 +1,5 @@
import { createContext, useContext, useMemo, useState, useEffect } from 'react'
import { login as apiLogin } from '../api/client'
import { login as apiLogin, logoutUser } from '../api/client'
const AuthContext = createContext(null)
@@ -46,7 +46,12 @@ export function AuthProvider({ children }) {
setToken(data.token)
setEmail(data.email || loginInput)
},
logout() {
async logout() {
try {
await logoutUser()
} catch {
// Ignore logout failures; client state is cleared regardless.
}
localStorage.removeItem('speedbb_token')
localStorage.removeItem('speedbb_email')
localStorage.removeItem('speedbb_user_id')