front/src/components/Indicator/Indicator.tsx
Showing 3 of 3 total issues
Function Indicator
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
Open
export const Indicator = (props: config) => { const { name, value, unit, alarm, icon, loading, last_update } = props.config; const [loadingState, setLoadingState] = useState<boolean>(false); useEffect(() => {
- Read upRead up
Avoid too many return
statements within this function. Open
Open
return 'ideal seria menor ou igual a ' + alarm?.values[0];
Avoid too many return
statements within this function. Open
Open
return 'ideal seria maior ou igual a ' + alarm?.values[0];