|
1 | 1 | import BrowserOnly from '@docusaurus/BrowserOnly'; |
2 | 2 | import Layout from '@theme/Layout'; |
3 | | -import { InlineReactodia } from '@site/src/components/InlineReactodia'; |
| 3 | +import { InlineReactodia, InlineReactodiaHead } from '@site/src/components/InlineReactodia'; |
4 | 4 | import { ViewSource } from '@site/src/components/ViewSource'; |
5 | 5 |
|
6 | 6 | export default function Example(): JSX.Element { |
7 | 7 | return ( |
8 | | - <Layout title='Playground: Stress Test' |
9 | | - noFooter> |
10 | | - <BrowserOnly> |
11 | | - {() => { |
12 | | - const {PlaygroundStressTest} = require('@site/src/examples/PlaygroundStressTest') as |
13 | | - typeof import('@site/src/examples/PlaygroundStressTest'); |
| 8 | + <> |
| 9 | + <InlineReactodiaHead /> |
| 10 | + <Layout title='Playground: Stress Test' |
| 11 | + noFooter> |
| 12 | + <BrowserOnly> |
| 13 | + {() => { |
| 14 | + const {PlaygroundStressTest} = require('@site/src/examples/PlaygroundStressTest') as |
| 15 | + typeof import('@site/src/examples/PlaygroundStressTest'); |
14 | 16 |
|
15 | | - const params = new URLSearchParams(document.location.search); |
16 | | - const nodeCount = params.has('node-count') ? Number(params.get('node-count')) : NaN; |
17 | | - const edgedPerNode = params.has('edges-per-node') ? Number(params.get('edges-per-node')) : NaN; |
| 17 | + const params = new URLSearchParams(document.location.search); |
| 18 | + const nodeCount = params.has('node-count') ? Number(params.get('node-count')) : NaN; |
| 19 | + const edgedPerNode = params.has('edges-per-node') ? Number(params.get('edges-per-node')) : NaN; |
18 | 20 |
|
19 | | - return ( |
20 | | - <InlineReactodia fullSize> |
21 | | - <PlaygroundStressTest |
22 | | - nodeCount={Number.isFinite(nodeCount) ? nodeCount : undefined} |
23 | | - edgesPerNode={Number.isFinite(edgedPerNode) ? edgedPerNode : undefined} |
24 | | - /> |
25 | | - </InlineReactodia> |
26 | | - ); |
27 | | - }} |
28 | | - </BrowserOnly> |
29 | | - <ViewSource target='/docs/examples/stress-test' /> |
30 | | - </Layout> |
| 21 | + return ( |
| 22 | + <InlineReactodia fullSize> |
| 23 | + <PlaygroundStressTest |
| 24 | + nodeCount={Number.isFinite(nodeCount) ? nodeCount : undefined} |
| 25 | + edgesPerNode={Number.isFinite(edgedPerNode) ? edgedPerNode : undefined} |
| 26 | + /> |
| 27 | + </InlineReactodia> |
| 28 | + ); |
| 29 | + }} |
| 30 | + </BrowserOnly> |
| 31 | + <ViewSource target='/docs/examples/stress-test' /> |
| 32 | + </Layout> |
| 33 | + </> |
31 | 34 | ); |
32 | 35 | } |
0 commit comments