Skip to content

Commit

Permalink
Properly use withPrefix in adding-images-fonts-files docs (#3503)
Browse files Browse the repository at this point in the history
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 KyleAMathews committed Jan 12, 2018
1 parent adbd86f commit 3945d01
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 3945d01

Please sign in to comment.