Skip to content

Instantly share code, notes, and snippets.

View riyaadh-abrahams's full-sized avatar
🥑
Focusing

Riyaadh Abrahams riyaadh-abrahams

🥑
Focusing
View GitHub Profile
import { type ReactNode } from "react";
import { XCircleIcon } from "@heroicons/react/20/solid";
import type z from "zod";
import { type ZodTypeAny } from "zod";
import { fromZodError } from "zod-validation-error";
type TResult<T> =
| { ok: true; data: T; errorAlert?: ReactNode }
| { ok: false; errorAlert?: ReactNode };