diff options
author | August Skare <post@augustskare.no> | 2018-10-19 22:02:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 22:02:15 +0800 |
commit | 580e574c841fb9b0ba9d37a50bd5a0f787799ff2 (patch) | |
tree | cf35d1d5b93cb73aba412197cdaeeb1a113b05ad /packages/dev-tools-pages/ts/pages/Cov.tsx | |
parent | 30f7f83573c9254de336c3c2fc7297188d47af15 (diff) | |
download | dexon-sol-tools-580e574c841fb9b0ba9d37a50bd5a0f787799ff2.tar dexon-sol-tools-580e574c841fb9b0ba9d37a50bd5a0f787799ff2.tar.gz dexon-sol-tools-580e574c841fb9b0ba9d37a50bd5a0f787799ff2.tar.bz2 dexon-sol-tools-580e574c841fb9b0ba9d37a50bd5a0f787799ff2.tar.lz dexon-sol-tools-580e574c841fb9b0ba9d37a50bd5a0f787799ff2.tar.xz dexon-sol-tools-580e574c841fb9b0ba9d37a50bd5a0f787799ff2.tar.zst dexon-sol-tools-580e574c841fb9b0ba9d37a50bd5a0f787799ff2.zip |
Feature/build step (#2)
* BundleAnalyzerPlugin
* lazy load highlight.js
* seperate bundles for each page
* prerender apps to html on build
* preload important font files
* dont prerender code copy button
* fix woff2 variant of font
* added missing doctype
* remove metatags component
Diffstat (limited to 'packages/dev-tools-pages/ts/pages/Cov.tsx')
-rw-r--r-- | packages/dev-tools-pages/ts/pages/Cov.tsx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/dev-tools-pages/ts/pages/Cov.tsx b/packages/dev-tools-pages/ts/pages/Cov.tsx index b7405f8f9..e835e5c82 100644 --- a/packages/dev-tools-pages/ts/pages/Cov.tsx +++ b/packages/dev-tools-pages/ts/pages/Cov.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; +import { render, hydrate } from 'react-dom'; import context from 'ts/context/cov'; -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 Intro from 'ts/components/Intro'; -function Cov(props: any) { +function Cov() { return ( <Base context={context}> <Container> @@ -58,4 +59,10 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi ); } -export default Cov; +const root = document.getElementById('app'); + +if (root.hasChildNodes()) { + hydrate(<Cov />, root); +} else { + render(<Cov />, root); +} |