fix api url

This commit is contained in:
Karol Wypchlo 2021-02-08 18:49:58 +01:00
parent 203d12b287
commit b44325cce6
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
export default function Message({ title, items = [] }) {
export default function Message({ type, title, items = [] }) {
return (
<div className="rounded-md bg-red-50 p-4">
<div className="flex">

View File

@ -146,9 +146,10 @@ export default function Login({ flow }) {
Sign in
</button>
{Boolean(flow.methods.password.config.errors?.length) && (
<Message items={flow.methods.password.config.errors.map(({ message }) => message)} />
)}
{Boolean(flow.methods.password.config.messages?.length) &&
flow.methods.password.config.messages.map((message) => (
<Message type={message.type} title={message.text} />
))}
</form>
</div>
</div>