Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
better-wp-security
/
core
/
packages
/
components
/
src
/
error-list
:
index.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * Internal dependencies */ import { transformApiErrorToList } from '@ithemes/security-utils'; import { MessageList } from '../'; export default function ErrorList( { errors, apiError, schemaError, title, className, hasBorder, noMargins, } ) { const all = [ ...( errors || [] ), ...transformApiErrorToList( apiError ), ...( schemaError || [] ).map( ( error ) => error.stack ), ]; if ( ! all.length ) { return null; } return ( <MessageList messages={ all } title={ title } className={ className } hasBorder={ hasBorder } noMargins={ noMargins } type="error" /> ); }