Skip to content

Commit 745ca5a

Browse files
committed
Refactor Errors.tsx
1 parent e79b262 commit 745ca5a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/connect-react/src/components/Errors.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ export function Errors<T extends ConfigurableProps, U extends ConfigurableProp>(
3636
gridTemplateColumns: "max-content",
3737
}
3838

39+
const FormattedErrors = () => {
40+
return <>{formattedErrors.map((fe, idx: number) => <Alert prop={fe} key={idx}/>)}</>
41+
}
42+
3943
return (
40-
<div className="pd-errors" style={baseStyles}>{formattedErrors.map((fe, idx: number) => <Alert prop={fe} key={idx}/>)}</div>
44+
<div className="pd-errors" style={baseStyles}><FormattedErrors/></div>
4145
);
4246
}

0 commit comments

Comments
 (0)