Files
mamad-app/app/page.tsx
2025-06-22 00:01:22 +03:00

26 lines
547 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client"
import { useEffect } from "react"
import { useRouter } from "next/navigation"
export default function HomePage() {
const router = useRouter()
useEffect(() => {
const user = localStorage.getItem("user")
if (user) {
router.push("/dashboard")
} else {
router.push("/login")
}
}, [router])
return (
<div className="min-h-screen flex items-center justify-center">
<div className="text-center">
<h1 className="text-2xl font-bold mb-4">טוען...</h1>
</div>
</div>
)
}