aboutsummaryrefslogtreecommitdiffstats
path: root/packages/dev-tools-pages/ts/pages/Trace.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/dev-tools-pages/ts/pages/Trace.tsx')
-rw-r--r--packages/dev-tools-pages/ts/pages/Trace.tsx13
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/dev-tools-pages/ts/pages/Trace.tsx b/packages/dev-tools-pages/ts/pages/Trace.tsx
index 5dddf027e..be5acdac4 100644
--- a/packages/dev-tools-pages/ts/pages/Trace.tsx
+++ b/packages/dev-tools-pages/ts/pages/Trace.tsx
@@ -1,7 +1,8 @@
import * as React from 'react';
+import { render, hydrate } from 'react-dom';
import context from 'ts/context/trace';
-import Base from './Base';
+import Base from 'ts/components/Base';
import Container from 'ts/components/Container';
import Main from 'ts/components/Main';
import ContentBlock from 'ts/components/ContentBlock';
@@ -11,7 +12,7 @@ import InlineCode from 'ts/components/InlineCode';
import List from 'ts/components/List';
import TraceComponent from 'ts/components/Trace';
-function Trace(props: any) {
+function Trace() {
return (
<Base context={context}>
<TraceComponent />
@@ -52,4 +53,10 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi
);
}
-export default Trace;
+const root = document.getElementById('app');
+
+if (root.hasChildNodes()) {
+ hydrate(<Trace />, root);
+} else {
+ render(<Trace />, root);
+}