Skip to content

Commit

Permalink
fix(data-warehouse): Have better popup text when saving an insight fr…
Browse files Browse the repository at this point in the history
…om the data warehouse… (#26599)
  • Loading branch information
Gilbert09 authored Dec 3, 2024
1 parent cd2b525 commit 0a4282b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions frontend/src/scenes/insights/insightLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,15 @@ export const insightLogic: LogicWrapper<insightLogicType> = kea<insightLogicType
query: values.query,
saved: true,
})
lemonToast.info(
`You're now working on a copy of ${values.insight.name || values.insight.derived_name || name}`
)

if (router.values.location.pathname.includes(urls.dataWarehouse())) {
lemonToast.info(`You're now viewing ${values.insight.name || values.insight.derived_name || name}`)
} else {
lemonToast.info(
`You're now working on a copy of ${values.insight.name || values.insight.derived_name || name}`
)
}

persist && actions.setInsight(insight, { fromPersistentApi: true, overrideQuery: true })
savedInsightsLogic.findMounted()?.actions.loadInsights() // Load insights afresh

Expand Down

0 comments on commit 0a4282b

Please sign in to comment.