Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
fix(docz): resolve react warnings in ErrorReporter (#465)
Browse files Browse the repository at this point in the history
- `div` is invalid descendent of `p`
- no keys on mapped children
  • Loading branch information
jossmac authored and pedronauck committed Nov 23, 2018
1 parent ae02f01 commit 1b0e09d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/docz/src/components/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const styles: StylesMap = {
stack: {
display: 'flex',
flexDirection: 'column',
marginBottom: '1em',
marginTop: '1em',
},
}

Expand All @@ -40,11 +42,11 @@ const ErrorReporter: SFC<ErrorBoundaryRP> = ({ error, componentStack }) => (
{error && <div>{error.message}</div>}
<h2 style={styles.subtitle}>Stack trace</h2>
{componentStack && (
<p style={styles.stack}>
<div style={styles.stack}>
{componentStack.split('\n').map(str => (
<div>{str}</div>
<div key={str}>{str}</div>
))}
</p>
</div>
)}
</div>
</div>
Expand Down

0 comments on commit 1b0e09d

Please sign in to comment.