mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: eslint react hook fix for public folder (#31174)
* Fixes under public/app/plugins * Fixes under public/app/plugins/datasource * Fixes under public/app/features * Fixes under public/app/features * Fixes under public/app/features * Fixes under public/app/components * Fix PanelNotSupported test * Fix one more warning * Fix warning in usePanelSave * Fix traceview empty response * Azure monitor fixes * More fixes * Fix tests for azure monitor * Fixes after merging master * Add comment for disabled rules * Fixes after merging master * Fixes after merging master * Adress review comments * Fix azure tests * Address review feedbacks
This commit is contained in:
@@ -17,10 +17,6 @@ export interface Props {
|
||||
}
|
||||
|
||||
export const DashboardLinks: FC<Props> = ({ dashboard, links }) => {
|
||||
if (!links.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Emulate forceUpdate (https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate)
|
||||
const [, forceUpdate] = useReducer((x) => x + 1, 0);
|
||||
|
||||
@@ -39,6 +35,10 @@ export const DashboardLinks: FC<Props> = ({ dashboard, links }) => {
|
||||
};
|
||||
});
|
||||
|
||||
if (!links.length) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{links.map((link: DashboardLink, index: number) => {
|
||||
|
||||
Reference in New Issue
Block a user