Skip to content

Conversation

@psankhe28
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Sep 5, 2023

@psankhe28 is attempting to deploy a commit to the UCI Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@geeky-abhishek geeky-abhishek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I can see a lot of code is repeated multiple times ,try to move them to some util to reduce the line of code and reuse the created logic

}
/>
<Route
path="/monitoring"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use some config array and iterate through each element to reduce the line of code

const res = JSON.parse(response.data.result);
setBroadcastTransformerData(res["Broadcast Transformer".trim()] || {});
} catch (error) {
console.error("Error toggling:", error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toastify the error instead of console.log

};

useEffect(() => {
func();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever the value of date changes, the function is being called so it is present in use effect

setSelectedChart(value);
setDropdownLabel(label);
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not good either use some function to get the final value or use memorised value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants