diff options
author | August Skare <post@augustskare.no> | 2018-10-19 22:02:15 +0800 |
---|---|---|
committer | August Skare <post@augustskare.no> | 2018-10-19 22:05:09 +0800 |
commit | 7d7f54c751a2a5b8fca6791fb6685f4b5f969fff (patch) | |
tree | ab720f884ddf74953e119c7207ef4e52eb1760aa /packages/dev-tools-pages/ts/pages/Profiler.tsx | |
parent | 736e1717fa4e59594e76694f7f6cc9dd0b45f1a9 (diff) | |
download | dexon-sol-tools-7d7f54c751a2a5b8fca6791fb6685f4b5f969fff.tar dexon-sol-tools-7d7f54c751a2a5b8fca6791fb6685f4b5f969fff.tar.gz dexon-sol-tools-7d7f54c751a2a5b8fca6791fb6685f4b5f969fff.tar.bz2 dexon-sol-tools-7d7f54c751a2a5b8fca6791fb6685f4b5f969fff.tar.lz dexon-sol-tools-7d7f54c751a2a5b8fca6791fb6685f4b5f969fff.tar.xz dexon-sol-tools-7d7f54c751a2a5b8fca6791fb6685f4b5f969fff.tar.zst dexon-sol-tools-7d7f54c751a2a5b8fca6791fb6685f4b5f969fff.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/Profiler.tsx')
-rw-r--r-- | packages/dev-tools-pages/ts/pages/Profiler.tsx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/dev-tools-pages/ts/pages/Profiler.tsx b/packages/dev-tools-pages/ts/pages/Profiler.tsx index d129d6427..9f8b46b9c 100644 --- a/packages/dev-tools-pages/ts/pages/Profiler.tsx +++ b/packages/dev-tools-pages/ts/pages/Profiler.tsx @@ -1,7 +1,8 @@ import * as React from 'react'; +import { render, hydrate } from 'react-dom'; import context from 'ts/context/profiler'; -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 Profiler(props: any) { +function Profiler() { return ( <Base context={context}> <Container> @@ -58,4 +59,10 @@ const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDi ); } -export default Profiler; +const root = document.getElementById('app'); + +if (root.hasChildNodes()) { + hydrate(<Profiler />, root); +} else { + render(<Profiler />, root); +} |