logger added

This commit is contained in:
Owen Rees
2023-06-22 17:03:01 +02:00
parent 2e5d122329
commit 195a2a98fc
6 changed files with 19 additions and 6 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { Dispatch, FormEvent, SetStateAction } from "react";
import sendMail from "@/lib/sendMail";
import { errorLog } from "@/utils/logger";
export const handleEmailSubmit = async (
e: FormEvent<HTMLFormElement>,
@@ -34,7 +35,7 @@ export const handleEmailSubmit = async (
setIsSending(false);
}
} catch (error) {
console.log(error); //TODO add to logger
errorLog(error);
setResponseMessage({
isSuccessful: false,
message: "Oops something went wrong. Please try again.",