Commit 5f74c949 authored by aniket-engg's avatar aniket-engg Committed by Aniket

show slither checkbox only for localhost workspace

parent bc6ef254
...@@ -12,6 +12,7 @@ export interface RemixUiCheckboxProps { ...@@ -12,6 +12,7 @@ export interface RemixUiCheckboxProps {
id?: string id?: string
itemName?: string itemName?: string
categoryId?: string categoryId?: string
visibility?: string
} }
export const RemixUiCheckbox = ({ export const RemixUiCheckbox = ({
...@@ -23,10 +24,11 @@ export const RemixUiCheckbox = ({ ...@@ -23,10 +24,11 @@ export const RemixUiCheckbox = ({
checked, checked,
onChange, onChange,
itemName, itemName,
categoryId categoryId,
visibility
}: RemixUiCheckboxProps) => { }: RemixUiCheckboxProps) => {
return ( return (
<div className="listenOnNetwork_2A0YE0 custom-control custom-checkbox" style={{ display: 'flex', alignItems: 'center' }} onClick={onClick}> <div className="listenOnNetwork_2A0YE0 custom-control custom-checkbox" style={{ display: 'flex', alignItems: 'center', visibility: `${visibility}` }} onClick={onClick}>
<input <input
id={id} id={id}
type={inputType} type={inputType}
......
...@@ -56,6 +56,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { ...@@ -56,6 +56,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
} }
const [autoRun, setAutoRun] = useState(true) const [autoRun, setAutoRun] = useState(true)
const [slitherEnabled, setSlitherEnabled] = useState(false) const [slitherEnabled, setSlitherEnabled] = useState(false)
const [showSlither, setShowSlither] = useState('hidden')
const [categoryIndex, setCategoryIndex] = useState(groupedModuleIndex(groupedModules)) const [categoryIndex, setCategoryIndex] = useState(groupedModuleIndex(groupedModules))
const warningContainer = React.useRef(null) const warningContainer = React.useRef(null)
...@@ -341,6 +342,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => { ...@@ -341,6 +342,7 @@ export const RemixUiStaticAnalyser = (props: RemixUiStaticAnalyserProps) => {
checked={slitherEnabled} checked={slitherEnabled}
label="Enable Slither Analysis" label="Enable Slither Analysis"
onChange={() => {}} onChange={() => {}}
visibility = {showSlither}
/> />
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment