fix details

This commit is contained in:
karenvicent committed 2025-09-03 09:55:53 -04:00
1 parent 8fae69b7a4
commit 137ba9185e
5 files changed
+15 -5

No files matched your search

@@ -1,6 +1,8 @@
import { useState } from "react";
import { newOrChangedCredentials } from "../../../../../Validation/validation";
import { useTranslation } from "react-i18next";
const useAddTeamMember = () => {
const { t } = useTranslation();
const [errors, setErrors] = useState({});
const clearErrors = () => setErrors({});
@@ -29,7 +31,9 @@ const useAddTeamMember = () => {
}
}
if (!role[0] || role.length === 0) {
formErrors.role = "Role is required";
formErrors.role = t(
"teamPanel.registerTeamMember.auth.common.inputs.role.errors.empty"
);
}
if (Object.keys(formErrors).length > 0) {
setErrors(formErrors);