Using zod-prisma-types ❤️

This commit is contained in:
aronmal 2023-04-24 18:54:39 +02:00
parent c895bcef19
commit d3e8a43b34
Signed by: aronmal
GPG key ID: 816B7707426FC612
7 changed files with 4536 additions and 16 deletions

View file

@ -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: {