Update frontend/src/components/source/SourceDetailContent.tsx
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
parent
c7de8ecd86
commit
8fdb0f0539
1 changed files with 9 additions and 4 deletions
|
|
@ -782,10 +782,15 @@ export function SourceDetailContent({
|
|||
}}
|
||||
insight={selectedInsight ?? undefined}
|
||||
onDelete={async (insightId) => {
|
||||
await insightsApi.delete(insightId)
|
||||
toast.success('Insight deleted successfully')
|
||||
setSelectedInsight(null)
|
||||
await fetchInsights()
|
||||
try {
|
||||
await insightsApi.delete(insightId)
|
||||
toast.success('Insight deleted successfully')
|
||||
setSelectedInsight(null)
|
||||
await fetchInsights()
|
||||
} catch (err) {
|
||||
console.error('Failed to delete insight:', err)
|
||||
toast.error('Failed to delete insight')
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue