some change

This commit is contained in:
john 2025-05-16 16:09:35 +02:00
parent d4a1492d56
commit 313f1def49
38 changed files with 475 additions and 401 deletions

View file

@ -0,0 +1,22 @@
import { useNavigate } from 'react-router-dom'
import { AuthService } from '../authService.ts'
import { useEffect } from 'react'
interface LogoutPageProps {
authService: AuthService
}
export default function LogoutPage({ authService }: LogoutPageProps) {
const navigate = useNavigate()
useEffect(() => {
const timeout = setTimeout(async () => {
navigate('/login')
await authService.logout()
})
return () => clearTimeout(timeout)
}, [authService, navigate])
return <></>
}