File tree Expand file tree Collapse file tree 2 files changed +32
-22
lines changed Expand file tree Collapse file tree 2 files changed +32
-22
lines changed Original file line number Diff line number Diff line change 1
1
ASSET_PREFIX = http://localhost:3000
2
2
BASE_PATH = http://localhost:3000
3
3
NEXT_PUBLIC_USE_MOCK_API = true
4
+ USE_MOCK_DATA = true
Original file line number Diff line number Diff line change @@ -31,30 +31,39 @@ export default function RootLayout({
31
31
} : Readonly < {
32
32
children : React . ReactNode ;
33
33
} > ) {
34
+ const emptyDataScript = (
35
+ < script
36
+ dangerouslySetInnerHTML = { {
37
+ __html :
38
+ 'window.run_info = {}; window.workload_details = {}; window.benchmarks = {};' ,
39
+ } }
40
+ />
41
+ ) ;
42
+ const mockDataScript = (
43
+ < >
44
+ < script
45
+ dangerouslySetInnerHTML = { {
46
+ __html : runInfoScript ,
47
+ } }
48
+ />
49
+ < script
50
+ dangerouslySetInnerHTML = { {
51
+ __html : workloadDetailsScript ,
52
+ } }
53
+ />
54
+ < script
55
+ dangerouslySetInnerHTML = { {
56
+ __html : benchmarksScript ,
57
+ } }
58
+ />
59
+ </ >
60
+ ) ;
61
+ const dataScript =
62
+ process . env . USE_MOCK_DATA === 'true' ? mockDataScript : emptyDataScript ;
63
+
34
64
return (
35
65
< html lang = "en" >
36
- < head >
37
- { /* <script
38
- dangerouslySetInnerHTML={{
39
- __html: 'window.run_info = {}; window.workload_details = {}; window.benchmarks = {};',
40
- }}
41
- /> */ }
42
- < script
43
- dangerouslySetInnerHTML = { {
44
- __html : runInfoScript ,
45
- } }
46
- />
47
- < script
48
- dangerouslySetInnerHTML = { {
49
- __html : workloadDetailsScript ,
50
- } }
51
- />
52
- < script
53
- dangerouslySetInnerHTML = { {
54
- __html : benchmarksScript ,
55
- } }
56
- />
57
- </ head >
66
+ < head > { dataScript } </ head >
58
67
< body > { children } </ body >
59
68
</ html >
60
69
) ;
You can’t perform that action at this time.
0 commit comments