Initial commit
This commit is contained in:
25
app/page.tsx
Normal file
25
app/page.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
"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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user