diff --git a/src/Pages/ContentListTable/ContentListTable.tsx b/src/Pages/ContentListTable/ContentListTable.tsx index 4467c2de..f63ba083 100644 --- a/src/Pages/ContentListTable/ContentListTable.tsx +++ b/src/Pages/ContentListTable/ContentListTable.tsx @@ -246,28 +246,15 @@ const ContentListTable = () => { title: 'Trigger Snapshot', }; - const fetchDataFromAPI = async () => { + const introspectRepoForUuid = async (uuid) => { try { - const response = await fetch('../../services/Content/ContentApi'); - if (!response.ok) { - throw new Error('Failed to fetch data'); - } - const data = await response.json(); - console.log('Fetched data:', data); + await introspectRepository({ uuid, reset_count: false }); + clearCheckedRepositories(); } catch (error) { - console.error('Error fetching data:', error); + console.error('Error introspecting repository:', error); } }; - const someAction = { - title: 'Some Action', - onClick: () => { - fetchDataFromAPI(); - }, - }; - - return [someAction]; - const deleteAction = { title: 'Delete', onClick: () => @@ -312,7 +299,7 @@ const ContentListTable = () => { { isDisabled: actionTakingPlace || rowData?.status === 'Retrying', title: 'Introspect Now', - onClick: () => introspectRepoForUuid(rowData?.uuid).then(clearCheckedRepositories), + onClick: () => introspectRepoForUuid(rowData?.uuid), }, { isSeparator: true }, deleteAction,