fix length issue
This commit is contained in:
parent
f968e6a6c8
commit
6161c8fa2f
|
@ -123,7 +123,7 @@ export default function Login({ flow }) {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{field.errors && field.errors.length > 0 && (
|
{Boolean(field.errors?.length) && (
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
<Message items={field.errors.map(({ message }) => message)} />
|
<Message items={field.errors.map(({ message }) => message)} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -144,7 +144,7 @@ export default function Login({ flow }) {
|
||||||
Sign in
|
Sign in
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{flow.methods.password.config.errors.length > 0 && (
|
{Boolean(flow.methods.password.config.errors?.length) && (
|
||||||
<Message items={flow.methods.password.config.errors.map(({ message }) => message)} />
|
<Message items={flow.methods.password.config.errors.map(({ message }) => message)} />
|
||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -133,7 +133,7 @@ export default function Registration({ flow }) {
|
||||||
value={formik.values[field.name]}
|
value={formik.values[field.name]}
|
||||||
className="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm"
|
className="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-green-500 focus:border-green-500 sm:text-sm"
|
||||||
/>
|
/>
|
||||||
{field.errors && field.errors.length > 0 && (
|
{Boolean(field.errors?.length) && (
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
<Message items={field.errors.map(({ message }) => message)} />
|
<Message items={field.errors.map(({ message }) => message)} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -149,7 +149,7 @@ export default function Registration({ flow }) {
|
||||||
Sign up
|
Sign up
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{flow.methods.password.config.errors.length > 0 && (
|
{Boolean(flow.methods.password.config.errors?.length) && (
|
||||||
<Message items={flow.methods.password.config.errors.map(({ message }) => message)} />
|
<Message items={flow.methods.password.config.errors.map(({ message }) => message)} />
|
||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
|
|
Reference in New Issue