Updated the register to allow the difference between a individual and corporate

This commit is contained in:
Tiago Ribeiro
2023-10-27 15:50:02 +01:00
parent 0aefbb85ec
commit 6e31a05f21
8 changed files with 364 additions and 176 deletions

10
src/utils/email.ts Normal file
View File

@@ -0,0 +1,10 @@
import axios from "axios";
export const sendEmailVerification = (setIsLoading: (isLoading: boolean) => void, onSuccess: () => void, onError: (e: Error) => void) => {
setIsLoading(true);
axios
.post<{ok: boolean}>("/api/reset/sendVerification", {})
.then(onSuccess)
.catch(onError)
.finally(() => setIsLoading(false));
};