1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-10-26 01:05:49 -04:00

actually listen to react-hooks/exhaustive-deps warning

This commit is contained in:
2022-04-21 18:10:03 -04:00
parent 008bb3213b
commit 831139c132
11 changed files with 206 additions and 22 deletions

View File

@@ -64,7 +64,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
}
};
const validateCaptcha = async (formResponse) => {
const validateCaptcha = async (formResponse: unknown) => {
const response = await fetch(HCAPTCHA_API_ENDPOINT, {
method: "POST",
headers: {
@@ -80,10 +80,10 @@ const validateCaptcha = async (formResponse) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const result: any = await response.json();
return result.success;
return result.success as boolean;
};
const sendToAirtable = async (data) => {
const sendToAirtable = async (data: unknown) => {
const response = await fetch(`${AIRTABLE_API_ENDPOINT}${AIRTABLE_BASE}/Messages`, {
method: "POST",
headers: {

View File

@@ -1,5 +1,5 @@
import pRetry from "p-retry";
import faunadb from "faunadb";
import pRetry from "p-retry";
import { getAllNotes } from "../../lib/helpers/parse-notes";
import { logServerError } from "../../lib/helpers/sentry";
import type { NextApiRequest, NextApiResponse } from "next";