Skip to content

Commit

Permalink
docs: fix BrowserOnly return statement (#5953)
Browse files Browse the repository at this point in the history
* docs: fix BrowserOnly return statement

* Update docusaurus-core.md

* Fix version docs

* prettier

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
  • Loading branch information
MorookaKotaro and Josh-Cena authored Nov 15, 2021
1 parent 2f63d38 commit 284cdab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions website/docs/docusaurus-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ const MyComponent = () => {
return (
// highlight-start
<BrowserOnly>
{() => (
<span>page url = {window.location.href}</span>;
)}
{() => <span>page url = {window.location.href}</span>}
</BrowserOnly>
// highlight-end
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ const MyComponent = () => {
return (
// highlight-start
<BrowserOnly>
{() => {
<span>page url = {window.location.href}</span>;
}}
{() => <span>page url = {window.location.href}</span>}
</BrowserOnly>
// highlight-end
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ const MyComponent = () => {
return (
// highlight-start
<BrowserOnly>
{() => {
<span>page url = {window.location.href}</span>;
}}
{() => <span>page url = {window.location.href}</span>}
</BrowserOnly>
// highlight-end
);
Expand Down

0 comments on commit 284cdab

Please sign in to comment.