Using zod-prisma-types ❤️
This commit is contained in:
parent
c895bcef19
commit
d3e8a43b34
7 changed files with 4536 additions and 16 deletions
|
@ -5,7 +5,7 @@ import { faEye, faLeftLong } from "@fortawesome/pro-regular-svg-icons"
|
|||
import { faPlus, faUserPlus } from "@fortawesome/pro-solid-svg-icons"
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||
import useGameState from "@lib/hooks/useGameState"
|
||||
import { createSchema } from "@lib/zodSchemas"
|
||||
import { CreateSchema } from "@lib/zodSchemas"
|
||||
import status from "http-status"
|
||||
import { GetServerSideProps } from "next"
|
||||
import { useRouter } from "next/router"
|
||||
|
@ -61,7 +61,7 @@ export default function Home({ q }: Props) {
|
|||
body: JSON.stringify({ pin }),
|
||||
})
|
||||
.then(isAuthenticated)
|
||||
.then((game) => createSchema.parse(game))
|
||||
.then((game) => CreateSchema.parse(game))
|
||||
|
||||
const res = await toast.promise(gamePromise, {
|
||||
pending: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue