Fixed Themes not showing
This commit is contained in:
@@ -34,9 +34,19 @@ function LoginForm() {
|
||||
const [remember, setRemember] = useState(false)
|
||||
const [error, setError] = useState("")
|
||||
const [counts, setCounts] = useState({ leads: 0, conversion: 0, users: 0 })
|
||||
const [checkingSession, setCheckingSession] = useState(true)
|
||||
const counterStarted = useRef(false)
|
||||
const [testimonialIndex, setTestimonialIndex] = useState(0)
|
||||
|
||||
useEffect(() => {
|
||||
fetch("/api/auth/me", { credentials: "include" })
|
||||
.then((r) => {
|
||||
if (r.ok) router.push("/dashboard")
|
||||
else setCheckingSession(false)
|
||||
})
|
||||
.catch(() => setCheckingSession(false))
|
||||
}, [router])
|
||||
|
||||
const testimonials = [
|
||||
{
|
||||
text: "This CRM transformed how we manage our sales pipeline. We've seen a 40% increase in lead conversion.",
|
||||
@@ -240,6 +250,14 @@ function LoginForm() {
|
||||
}
|
||||
}
|
||||
|
||||
if (checkingSession) {
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0a0a0f] items-center justify-center">
|
||||
<div className="w-8 h-8 border-2 border-[#1BB0CE] border-t-transparent rounded-full animate-spin" />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0a0a0f]">
|
||||
<div className="left-panel flex flex-1 flex-col p-12">
|
||||
|
||||
Reference in New Issue
Block a user