From 65ee6e9182ac9e7e003bd215f97e62a419b3c4b8 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sun, 25 Jul 2021 04:10:42 -0300 Subject: [PATCH] Use light imports --- src/address/Contract.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/address/Contract.tsx b/src/address/Contract.tsx index 8873e00..e946391 100644 --- a/src/address/Contract.tsx +++ b/src/address/Contract.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from "react"; -import SyntaxHighlighter from "react-syntax-highlighter"; +import { Light as SyntaxHighlighter } from "react-syntax-highlighter"; import hljs from "highlight.js"; -import { docco } from "react-syntax-highlighter/dist/esm/styles/hljs"; +import docco from "react-syntax-highlighter/dist/esm/styles/hljs/docco"; import { sourcifySourceFile } from "../url"; @@ -44,7 +44,12 @@ const Contract: React.FC = ({ }, [checksummedAddress, networkId, filename, source.content]); return ( - + {content ?? ""} );