mirror of
https://github.com/woodchen-ink/proxy-go.git
synced 2025-07-18 00:21:56 +08:00
- 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
26 lines
538 B
TypeScript
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>
|
|
)
|
|
} |