-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitoring dashboard #60
base: monitoring-dashboard
Are you sure you want to change the base?
Monitoring dashboard #60
Conversation
@psankhe28 is attempting to deploy a commit to the UCI Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this 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
@@ -101,6 +111,126 @@ function App() { | |||
</RequireAuth> | |||
} | |||
/> | |||
<Route | |||
path="/monitoring" |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
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); | ||
}; | ||
|
There was a problem hiding this comment.
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
No description provided.