Skip to content

Commit 284cdab

Browse files
docs: fix BrowserOnly return statement (#5953)
* docs: fix BrowserOnly return statement * Update docusaurus-core.md * Fix version docs * prettier Co-authored-by: Joshua Chen <[email protected]>
1 parent 2f63d38 commit 284cdab

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

website/docs/docusaurus-core.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ const MyComponent = () => {
182182
return (
183183
// highlight-start
184184
<BrowserOnly>
185-
{() => (
186-
<span>page url = {window.location.href}</span>;
187-
)}
185+
{() => <span>page url = {window.location.href}</span>}
188186
</BrowserOnly>
189187
// highlight-end
190188
);

website/versioned_docs/version-2.0.0-beta.8/docusaurus-core.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ const MyComponent = () => {
133133
return (
134134
// highlight-start
135135
<BrowserOnly>
136-
{() => {
137-
<span>page url = {window.location.href}</span>;
138-
}}
136+
{() => <span>page url = {window.location.href}</span>}
139137
</BrowserOnly>
140138
// highlight-end
141139
);

website/versioned_docs/version-2.0.0-beta.9/docusaurus-core.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ const MyComponent = () => {
133133
return (
134134
// highlight-start
135135
<BrowserOnly>
136-
{() => {
137-
<span>page url = {window.location.href}</span>;
138-
}}
136+
{() => <span>page url = {window.location.href}</span>}
139137
</BrowserOnly>
140138
// highlight-end
141139
);

0 commit comments

Comments
 (0)