feat(project): init

This commit is contained in:
2026-02-03 18:05:47 +08:00
commit f37a119eff
188 changed files with 29246 additions and 0 deletions

22
app/store/InfoCheck.tsx Normal file
View File

@@ -0,0 +1,22 @@
"use client"
import { usePathname } from "next/navigation"
import { useEffect } from "react"
import { useUserStore } from "@/app/store/user"
export function InfoCheck() {
const pathname = usePathname()
const user_info = useUserStore.getState().user_info
useEffect(() => {
if (pathname.startsWith("/login")) {
return
}
if (!user_info.account) {
// tauri 打包后, 使用router.push跳转路由不执行会导致白屏
window.location.href = "/login"
}
}, [pathname, user_info.account])
return <></>
}