Hotfix: Signup fix error not shown (#3815)
* Fix error not shown * Simplifying * Removing dead codeimprovements/app-store-cli-video-apps
parent
a2a5d48037
commit
f57726dc95
|
@ -55,13 +55,6 @@ function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
|||
if (!hintErrors && fieldErrors && !fieldErrors.message) {
|
||||
// no hints passed, field errors exist and they are custom ones
|
||||
return (
|
||||
<>
|
||||
{fieldErrors?.message && (
|
||||
<div className="text-gray mt-2 flex items-center text-sm text-red-700">
|
||||
<Info className="mr-1 h-3 w-3" />
|
||||
{fieldErrors.message}
|
||||
</div>
|
||||
)}
|
||||
<div className="text-gray mt-2 flex items-center text-sm text-gray-700">
|
||||
<ul className="ml-2">
|
||||
{Object.keys(fieldErrors).map((key: string) => {
|
||||
|
@ -73,7 +66,6 @@ function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
|||
})}
|
||||
</ul>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -107,6 +99,16 @@ function HintsOrErrors<T extends FieldValues = FieldValues>(props: {
|
|||
);
|
||||
}
|
||||
|
||||
// errors exist, not custom ones, just show them as is
|
||||
if (fieldErrors) {
|
||||
return (
|
||||
<div className="text-gray mt-2 flex items-center text-sm text-red-700">
|
||||
<Info className="mr-1 h-3 w-3" />
|
||||
{fieldErrors.message}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!hintErrors) return null;
|
||||
|
||||
// hints passed, no errors exist, proceed to just show hints
|
||||
|
|
Loading…
Reference in New Issue