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 + }) } ]); }