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
fix: JSON.stringify cyclic error in showBuyDialog
thecodrr43dc570cdc8d
diff --git a/apps/web/src/app-effects.js b/apps/web/src/app-effects.jsindex 28e212839..e6f4ff464 100644--- a/apps/web/src/app-effects.js+++ b/apps/web/src/app-effects.js@@ -61,7 +61,7 @@ function AppEffects({ isMobile, isTablet, setShow }) {} else {if (type !== CHECK_IDS.databaseSync)await import("./common/dialogcontroller").then((dialogs) =>- dialogs.showBuyDialog(type)+ dialogs.showBuyDialog());return { type, result: false };}diff --git a/apps/web/src/common/checkout.js b/apps/web/src/common/checkout.jsindex 045d1c026..14f1ee50a 100644--- a/apps/web/src/common/checkout.js+++ b/apps/web/src/common/checkout.js@@ -62,6 +62,7 @@ async function openPaddleDialog(overrideUrl) {}async function getCouponData(coupon) {+ console.log(coupon);let url ="https://checkout-service.paddle.com/checkout/97379638-chre9f4b00ed6b3-732b0e853d/coupon";const response = await fetch(url, {diff --git a/apps/web/src/components/accent-item/index.js b/apps/web/src/components/accent-item/index.jsindex eab08832b..e9bfa08bc 100644--- a/apps/web/src/components/accent-item/index.js+++ b/apps/web/src/components/accent-item/index.js@@ -17,7 +17,7 @@ function AccentItem(props) {onClick={async () => {if (isUserPremium()) setAccent(code);else {- await showBuyDialog("customize");+ await showBuyDialog();}}}key={label}diff --git a/apps/web/src/components/dialogs/buydialog.js b/apps/web/src/components/dialogs/buydialog.jsindex 94b192397..2e71090d6 100644--- a/apps/web/src/components/dialogs/buydialog.js+++ b/apps/web/src/components/dialogs/buydialog.js@@ -131,6 +131,7 @@ function BuyDialog(props) {withoutDiscount: data.total[0],});} catch (e) {+ console.error(e);setError(e.message);} finally {setIsLoading(false);diff --git a/apps/web/src/components/editor/tinymce.js b/apps/web/src/components/editor/tinymce.jsindex 8134d8efb..72207f165 100644--- a/apps/web/src/components/editor/tinymce.js+++ b/apps/web/src/components/editor/tinymce.js@@ -219,7 +219,7 @@ function TinyMCE(props) {!isUserPremium()) {command.preventDefault();- await showBuyDialog("editor");+ await showBuyDialog();return;}}}diff --git a/apps/web/src/components/toggle/index.js b/apps/web/src/components/toggle/index.jsindex cbdf2df38..7cc0b770b 100644--- a/apps/web/src/components/toggle/index.js+++ b/apps/web/src/components/toggle/index.js@@ -16,7 +16,7 @@ function Toggle(props) {onClick={async () => {if (isUserPremium() || !premium) onToggled();else {- await showBuyDialog(premium);+ await showBuyDialog();}}}py={2}diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.jsindex 01bc76562..7cb83f63c 100644--- a/apps/web/src/views/settings.js+++ b/apps/web/src/views/settings.js@@ -504,7 +504,7 @@ function OptionsItem(props) {if (isUserPremium() || !premium)onSelectionChanged(option, index);else {- await showBuyDialog(premium);+ await showBuyDialog();}}}sx={{@@ -617,7 +617,7 @@ function AccountStatus(props) {</Text>{subtitle && <Text variant="subBody">{subtitle}</Text>}{isBasic || isTrial || remainingDays <= 0 ? (- <Button mt={2} onClick={showBuyDialog}>+ <Button mt={2} onClick={() => showBuyDialog()}>Upgrade to Notesnook Pro</Button>) : provider === "Streetwriters" ? (