1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-26 07:46:06 -05:00

remove unused deps

This commit is contained in:
2022-01-27 18:16:57 -05:00
parent 283eb62446
commit 766f39a15a
5 changed files with 69 additions and 61 deletions

View File

@@ -3,7 +3,6 @@ import { useTheme } from "next-themes";
import classNames from "classnames/bind";
import { Formik, Form, Field } from "formik";
import HCaptcha from "@hcaptcha/react-hcaptcha";
import isEmailLike from "is-email-like";
import { SendIcon, CheckOcticon, XOcticon } from "../Icons";
import type { FormikHelpers } from "formik";
@@ -85,7 +84,7 @@ const ContactForm = ({ className }: Props) => {
const errors: { name?: boolean; email?: boolean; message?: boolean; "h-captcha-response"?: boolean } = {};
errors.name = !values.name;
errors.email = !values.email || !isEmailLike(values.email); // also loosely validate email with regex (not foolproof)
errors.email = !values.email; // also loosely validated that it's email-like via browser (not foolproof)
errors.message = !values.message;
errors["h-captcha-response"] = !values["h-captcha-response"];