Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Move InsightsUpsellTab to metabase/common/components/upsell (#72155)

Romeo Van Snick32aedee1c782
diff --git a/frontend/src/metabase/dashboard/components/DashboardInfoSidebar/components/InsightsUpsellTab.tsx b/frontend/src/metabase/common/components/upsells/InsightsUpsellTab/InsightsUpsellTab.tsx
similarity index 100%
rename from frontend/src/metabase/dashboard/components/DashboardInfoSidebar/components/InsightsUpsellTab.tsx
rename to frontend/src/metabase/common/components/upsells/InsightsUpsellTab/InsightsUpsellTab.tsx
diff --git a/frontend/src/metabase/common/components/upsells/InsightsUpsellTab/index.ts b/frontend/src/metabase/common/components/upsells/InsightsUpsellTab/index.ts
new file mode 100644
index 00000000000..efa28afb670
--- /dev/null
+++ b/frontend/src/metabase/common/components/upsells/InsightsUpsellTab/index.ts
@@ -0,0 +1 @@
+export * from "./InsightsUpsellTab";
diff --git a/frontend/src/metabase/dashboard/components/DashboardInfoSidebar/DashboardInfoSidebar.tsx b/frontend/src/metabase/dashboard/components/DashboardInfoSidebar/DashboardInfoSidebar.tsx
index f734d377cad..c04fb276f16 100644
--- a/frontend/src/metabase/dashboard/components/DashboardInfoSidebar/DashboardInfoSidebar.tsx
+++ b/frontend/src/metabase/dashboard/components/DashboardInfoSidebar/DashboardInfoSidebar.tsx
@@ -17,6 +17,7 @@ import {
import { InsightsTabOrLink } from "metabase/common/components/Sidesheet/components/InsightsTabOrLink";
import { SidesheetEditableDescription } from "metabase/common/components/Sidesheet/components/SidesheetEditableDescription";
import SidesheetS from "metabase/common/components/Sidesheet/sidesheet.module.css";
+import { InsightsUpsellTab } from "metabase/common/components/upsells/InsightsUpsellTab";
import { revertToRevision, updateDashboard } from "metabase/dashboard/actions";
import { DASHBOARD_DESCRIPTION_MAX_LENGTH } from "metabase/dashboard/constants";
import {
@@ -36,7 +37,6 @@ import type {
import { DashboardDetails } from "./DashboardDetails";
import { DashboardEntityIdCard } from "./DashboardEntityIdCard";
-import { InsightsUpsellTab } from "./components/InsightsUpsellTab";
enum Tab {
Overview = "overview",
diff --git a/frontend/src/metabase/query_builder/components/view/sidebars/QuestionInfoSidebar/QuestionInfoSidebar.tsx b/frontend/src/metabase/query_builder/components/view/sidebars/QuestionInfoSidebar/QuestionInfoSidebar.tsx
index 8d445835972..f36a4217be8 100644
--- a/frontend/src/metabase/query_builder/components/view/sidebars/QuestionInfoSidebar/QuestionInfoSidebar.tsx
+++ b/frontend/src/metabase/query_builder/components/view/sidebars/QuestionInfoSidebar/QuestionInfoSidebar.tsx
@@ -15,7 +15,7 @@ import {
import { InsightsTabOrLink } from "metabase/common/components/Sidesheet/components/InsightsTabOrLink";
import { SidesheetEditableDescription } from "metabase/common/components/Sidesheet/components/SidesheetEditableDescription";
import SidesheetStyles from "metabase/common/components/Sidesheet/sidesheet.module.css";
-import { InsightsUpsellTab } from "metabase/dashboard/components/DashboardInfoSidebar/components/InsightsUpsellTab";
+import { InsightsUpsellTab } from "metabase/common/components/upsells/InsightsUpsellTab";
import { useDispatch } from "metabase/lib/redux";
import * as Urls from "metabase/lib/urls";
import { PLUGIN_MODERATION } from "metabase/plugins";