Skip to content

Commit

Permalink
fix(overview-page): update image import (#2545)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
joshblack and kodiakhq[bot] authored Sep 16, 2021
1 parent 7731052 commit 3f39300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ComponentOverview/ComponentOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class ComponentOverview extends React.Component {

let componentImg;
try {
componentImg = require(`./images/${component}.svg`);
componentImg = require(`./images/${component}.svg`).default;
} catch (e) {
// eslint-disable-next-line global-require
componentImg = require('./images/NoImage.svg');
componentImg = require('./images/NoImage.svg').default;
}

return (
Expand Down

1 comment on commit 3f39300

@vercel
Copy link

@vercel vercel bot commented on 3f39300 Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.