refactor: extract shared constants to lib/constants.ts
This commit is contained in:
@@ -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("/")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user