refactor: extract shared constants to lib/constants.ts

This commit is contained in:
zetaloop
2026-02-20 20:39:14 +08:00
parent ed3858cff3
commit 9267df9ea1
3 changed files with 23 additions and 32 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import { z } from "zod"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { currentUser } from "@/lib/mock-data"
import { useAuthStore } from "@/store/auth"
const loginSchema = z.object({
@@ -29,7 +30,7 @@ export default function LoginPage() {
const onSubmit = async (_data: z.infer<typeof loginSchema>) => {
await new Promise((r) => setTimeout(r, 500))
login()
login(currentUser, ["consumer", "player", "owner"])
router.push("/")
}