forked from WebKit/Speedometer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
36 lines (34 loc) · 1.55 KB
/
Copy pathindex.js
File metadata and controls
36 lines (34 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { useLayoutEffect } from "react";
import { HashRouter as Router, Routes, Route } from "react-router-dom";
import Page from "@/partials/page/page";
import Head from "next/head";
import { DataContextProvider } from "@/context/data-context";
import { connectToBenchmark } from "speedometer-utils/workload-testing-utils.mjs";
import { getBenchmarkSuitesManager } from "@/workload-test.mjs";
export default function App() {
useLayoutEffect(() => {
connectToBenchmark(getBenchmarkSuitesManager(), "news-next", 1);
}, []);
return (
<>
<Head>
<title>The Daily Broadcast</title>
<meta name="description" content="A news site developed with Next.js." key="description" />
</Head>
<DataContextProvider>
<Router>
<Routes>
<Route path="/business" element={<Page id="business" />} />
<Route path="/health" element={<Page id="health" />} />
<Route path="/opinion" element={<Page id="opinion" />} />
<Route path="/politics" element={<Page id="politics" />} />
<Route path="/us" element={<Page id="us" />} />
<Route path="/world" element={<Page id="world" />} />
<Route path="/home" element={<Page id="home" />} />
<Route path="/" element={<Page id="home" />} />
</Routes>
</Router>
</DataContextProvider>
</>
);
}