zustand auf server wiederhergestellt

This commit is contained in:
2026-01-09 08:43:18 +01:00
parent 1010fe7d11
commit f2f9e02fb2
30 changed files with 6403 additions and 139 deletions

View File

@@ -0,0 +1,28 @@
import { useEffect } from 'react'
import { useSearchParams, useNavigate } from 'react-router-dom'
export default function AuthCallback({ onLogin }) {
const [searchParams] = useSearchParams()
const navigate = useNavigate()
useEffect(() => {
const token = searchParams.get('token')
if (token) {
onLogin(token)
navigate('/', { replace: true })
} else {
// No token received, redirect to login with error
navigate('/login?error=oauth_failed', { replace: true })
}
}, [searchParams, onLogin, navigate])
return (
<div className="min-h-screen bg-gray-900 flex items-center justify-center">
<div className="text-center">
<div className="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500 mx-auto mb-4"></div>
<p className="text-gray-400">Anmeldung wird verarbeitet...</p>
</div>
</div>
)
}