A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: show upgrade dialog from toast
Abdullah Atta1af7f1bd7ff3
diff --git a/apps/web/src/common/toasts.ts b/apps/web/src/common/toasts.tsindex 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 Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-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<TId extends FeatureId>(- result: FeatureResult<TId> | undefined+export function showFeatureNotAllowedToast(+ result: FeatureResult<any> | undefined) {if (!result) return;showToast("error", result.error, [{text: "Upgrade",- onClick: () => BuyDialog.show({ plan: result.availableOn })+ onClick: () =>+ UpgradeDialog.show({+ feature: result+ })}]);}