proxy-go/web/app/page.tsx
wood chen 33d6a51416 refactor(web): Migrate to modern web frontend and simplify admin routes
- Remove legacy static files, templates, and JavaScript
- Update main.go to serve SPA-style web application
- Modify admin route handling to support client-side routing
- Simplify configuration and metrics API endpoints
- Remove server-side template rendering in favor of static file serving
- Update Dockerfile and GitHub Actions to build web frontend
2025-02-15 11:44:09 +08:00

26 lines
538 B
TypeScript

"use client"
import { useEffect } from "react"
import { useRouter } from "next/navigation"
export default function HomePage() {
const router = useRouter()
useEffect(() => {
// 检查是否已登录
const token = localStorage.getItem("token")
if (token) {
router.push("/dashboard")
} else {
router.push("/login")
}
}, [router])
return (
<div className="min-h-screen flex items-center justify-center">
<div className="text-center">
...
</div>
</div>
)
}