Function Indicator
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
export const Indicator = (props: config) => {
const { name, value, unit, alarm, icon, loading, last_update } = props.config;
const [loadingState, setLoadingState] = useState<boolean>(false);
useEffect(() => {
Function Select
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
export const Select = ({
options,
labelValue = 'name',
keyValue = 'id',
setOptionSelected,
Function Dashboard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
const Dashboard = () => {
const indicators: IndicatorProps[] = [
{
value: 27,
unit: 'celsius',
Avoid too many return
statements within this function.
return 'ideal seria menor ou igual a ' + alarm?.values[0];
Avoid too many return
statements within this function.
return 'ideal seria maior ou igual a ' + alarm?.values[0];