From 1439177c170b475e3c0a750210abeb4b8d322463 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 24 Jun 2021 12:49:26 +0530 Subject: [PATCH] intermediate commit --- .../src/lib/remix-ui-static-analyser.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx index 2e4f9ad09e..e2dcd06777 100644 --- a/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx +++ b/libs/remix-ui/static-analyser/src/lib/remix-ui-static-analyser.tsx @@ -57,6 +57,8 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { const [autoRun, setAutoRun] = useState(true) const [slitherEnabled, setSlitherEnabled] = useState(false) const [showSlither, setShowSlither] = useState('hidden') + const [showSlitherResult, setShowSlitherResult] = useState('hidden') + const [showSlitherResultEnabled, setShowSlitherResultEnabled] = useState(false) const [categoryIndex, setCategoryIndex] = useState(groupedModuleIndex(groupedModules)) const warningContainer = React.useRef(null) @@ -289,7 +291,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { } } - const handleSlitherEnabled = () => { + const handleShowSlitherResultEnabled = () => { if (slitherEnabled) { setSlitherEnabled(false) } else { @@ -297,6 +299,14 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { } } + const handleSlitherEnabled = () => { + if (showSlitherResultEnabled) { + setShowSlitherResultEnabled(false) + } else { + setShowSlitherResultEnabled(true) + } + } + const handleAutoRun = () => { if (autoRun) { setAutoRun(false)