docs: fix BrowserOnly return statement (#5953)

* docs: fix BrowserOnly return statement

* Update docusaurus-core.md

* Fix version docs

* prettier

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
Morooka Kotaro 2021-11-15 22:27:45 +09:00 committed by GitHub
parent 2f63d383e5
commit 284cdabb0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 9 deletions

View file

@ -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
);

View file

@ -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
);

View file

@ -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
);