From eb707cfe671adc8f6eded779bb1f32002dc621bc Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 18 Jun 2021 13:45:58 +0530 Subject: [PATCH] enable slither checkbox added --- .../src/lib/remix-ui-static-analyser.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 f839ee7036..f84965dbad 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 @@ -55,6 +55,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { return indexOfCategory } const [autoRun, setAutoRun] = useState(true) + const [slitherEnabled, setSlitherEnabled] = useState(false) const [categoryIndex, setCategoryIndex] = useState(groupedModuleIndex(groupedModules)) const warningContainer = React.useRef(null) @@ -223,6 +224,14 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { } } + const handleSlitherEnabled = () => { + if (slitherEnabled) { + setSlitherEnabled(false) + } else { + setSlitherEnabled(true) + } + } + const handleAutoRun = () => { if (autoRun) { setAutoRun(false) @@ -321,6 +330,16 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { onChange={() => {}} />