added dependency list in useAsync
Signed-off-by: mufaddal motiwala <mufaddalmm.52@gmail.com>
This commit is contained in:
@@ -51,7 +51,7 @@ export const DashboardEntityList = () => {
|
||||
String(DashboardEntity?.integrationKey),
|
||||
);
|
||||
return dashboardObject;
|
||||
}, []);
|
||||
}, [DashboardEntity?.integrationKey]);
|
||||
if (loading) {
|
||||
return <Progress />;
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ export const DashboardSnapshot = ({
|
||||
const dashboardObject: Promise<DashboardSnapshotSummary | undefined> =
|
||||
newRelicDashboardAPI.getDashboardSnapshot(guid, duration);
|
||||
return dashboardObject;
|
||||
}, []);
|
||||
}, [guid, duration]);
|
||||
if (loading) {
|
||||
return <Progress />;
|
||||
}
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ export const DashboardSnapshotList = ({ guid }: Props) => {
|
||||
const dashboardObject: Promise<DashboardEntitySummary | undefined> =
|
||||
newRelicDashboardAPI.getDashboardEntity(guid);
|
||||
return dashboardObject;
|
||||
}, []);
|
||||
}, [guid]);
|
||||
const [value1, setValue1] = useState<number>(0);
|
||||
const handleChange = ({}: React.ChangeEvent<{}>, newValue: number) => {
|
||||
setValue1(newValue);
|
||||
|
||||
Reference in New Issue
Block a user