Skip to content

Commit

Permalink
Properly use withPrefix in adding-images-fonts-files docs (gatsbyjs…
Browse files Browse the repository at this point in the history
…#3503)

I came across this while browsing through the documentation. The `withPrefix` import was left unused in the "escape hatch" example, which I'm pretty sure is not intentional.
  • Loading branch information
trotzig authored and danielfarrell committed Jan 13, 2018
1 parent 04931e6 commit b2952eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/adding-images-fonts-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ render() {
// Note: this is an escape hatch and should be used sparingly!
// Normally we recommend using `import` for getting asset URLs
// as described in “Adding Images and Fonts” above this section.
return <img src={__PATH_PREFIX__ + '/img/logo.png'} alt="Logo" />;
return <img src={withPrefix('/img/logo.png')} alt="Logo" />;
}
```

Expand Down

0 comments on commit b2952eb

Please sign in to comment.