Skip to content

Commit 82579fc

Browse files
committed
Moved <Layout> out of Benchmark component and into index
1 parent d7ee9af commit 82579fc

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

src/pages/benchviz/Benchmark.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Layout from "@theme/Layout";
21
import * as d3 from "d3";
32
import React, { useEffect, useRef } from "react";
43
import * as zlib from "zlib";
@@ -83,9 +82,9 @@ export default function Benchmark() {
8382
});
8483

8584
return (
86-
<Layout title="BenchViz">
87-
{/* Results table */}
85+
<>
8886
<h2>Benchmark results</h2>
87+
{/* Results table */}
8988
<table>
9089
<thead>
9190
<tr style={{ fontWeight: "bold" }}>
@@ -113,7 +112,7 @@ export default function Benchmark() {
113112
width={garbageCreatedComparisonGraphWidth}
114113
height={garbageCreatedComparisonGraphHeight}
115114
></svg>
116-
</Layout>
115+
</>
117116
);
118117
}
119118

src/pages/benchviz/index.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1+
import Layout from "@theme/Layout";
12
import React from "react";
23
import Benchmark from "./Benchmark";
34

45
export default function CreateBenchmark() {
56
const isSSR = typeof window === "undefined";
6-
return (
7-
!isSSR && (
8-
<React.Suspense fallback={<div />}>
9-
<Benchmark />
10-
</React.Suspense>
11-
)
12-
);
7+
return <Layout title="Benchmark">{!isSSR && <Benchmark />}</Layout>;
138
}

0 commit comments

Comments
 (0)