Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 4x 4x 5x | type Props = { errors: { [key: string]: Array<string> }; }; function RenderErrors({ errors }: Props) { return ( <div className="p-notification--negative"> <div className="p-notification__content"> <p className="p-notification__message"> {Object.keys(errors).map((fileName) => ( <span key={`errors-${fileName}`}> {fileName} {errors[fileName].map((error, index: number) => ( <span key={`errors-${fileName}-${index}`}> {error} <br /> </span> ))} </span> ))} </p> </div> </div> ); } export default RenderErrors; |