From 1af7f1bd7ff3fedea2003ad2b7526afd39f97628 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 4 Aug 2025 13:17:03 +0500 Subject: [PATCH] web: show upgrade dialog from toast --- apps/web/src/common/toasts.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/web/src/common/toasts.ts b/apps/web/src/common/toasts.ts index 9ad020398..38d345fc4 100644 --- a/apps/web/src/common/toasts.ts +++ b/apps/web/src/common/toasts.ts @@ -17,18 +17,21 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -import { FeatureId, FeatureResult } from "@notesnook/common"; +import { FeatureResult } from "@notesnook/common"; import { showToast } from "../utils/toast"; -import { BuyDialog } from "../dialogs/buy-dialog"; +import { UpgradeDialog } from "../dialogs/buy-dialog/upgrade-dialog"; -export function showFeatureNotAllowedToast( - result: FeatureResult | undefined +export function showFeatureNotAllowedToast( + result: FeatureResult | undefined ) { if (!result) return; showToast("error", result.error, [ { text: "Upgrade", - onClick: () => BuyDialog.show({ plan: result.availableOn }) + onClick: () => + UpgradeDialog.show({ + feature: result + }) } ]); }