Skip to content

Commit 3945d01

Browse files
trotzigKyleAMathews
authored andcommitted
Properly use withPrefix in adding-images-fonts-files docs (#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.
1 parent adbd86f commit 3945d01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/adding-images-fonts-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ render() {
8686
// Note: this is an escape hatch and should be used sparingly!
8787
// Normally we recommend using `import` for getting asset URLs
8888
// as described in “Adding Images and Fonts” above this section.
89-
return <img src={__PATH_PREFIX__ + '/img/logo.png'} alt="Logo" />;
89+
return <img src={withPrefix('/img/logo.png')} alt="Logo" />;
9090
}
9191
```
9292

0 commit comments

Comments
 (0)