disabled profiler calls for deleted tables for summary panel details (#9771)

This commit is contained in:
Aniket Katkar 2023-01-18 12:38:37 +05:30 committed by GitHub
parent e14d06503e
commit ecee1a6ce2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,8 @@ function TableSummary({ entityDetails }: TableSummaryProps) {
results: INITIAL_TEST_RESULT_SUMMARY,
});
const isTableDeleted = useMemo(() => entityDetails.deleted, [entityDetails]);
const fetchAllTests = async () => {
try {
const { data } = await getListTestCase({
@ -174,7 +176,7 @@ function TableSummary({ entityDetails }: TableSummaryProps) {
if (!isEmpty(entityDetails)) {
setTableDetails(entityDetails);
fetchAllTests();
fetchProfilerData();
!isTableDeleted && fetchProfilerData();
}
}, [entityDetails]);