mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-02 12:14:48 +02:00
fix: JSON.stringify cyclic error in showBuyDialog
This commit is contained in:
@@ -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 };
|
||||
}
|
||||
|
||||
@@ -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, {
|
||||
|
||||
@@ -17,7 +17,7 @@ function AccentItem(props) {
|
||||
onClick={async () => {
|
||||
if (isUserPremium()) setAccent(code);
|
||||
else {
|
||||
await showBuyDialog("customize");
|
||||
await showBuyDialog();
|
||||
}
|
||||
}}
|
||||
key={label}
|
||||
|
||||
@@ -131,6 +131,7 @@ function BuyDialog(props) {
|
||||
withoutDiscount: data.total[0],
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
setError(e.message);
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
|
||||
@@ -219,7 +219,7 @@ function TinyMCE(props) {
|
||||
!isUserPremium()
|
||||
) {
|
||||
command.preventDefault();
|
||||
await showBuyDialog("editor");
|
||||
await showBuyDialog();
|
||||
return;
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -16,7 +16,7 @@ function Toggle(props) {
|
||||
onClick={async () => {
|
||||
if (isUserPremium() || !premium) onToggled();
|
||||
else {
|
||||
await showBuyDialog(premium);
|
||||
await showBuyDialog();
|
||||
}
|
||||
}}
|
||||
py={2}
|
||||
|
||||
@@ -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" ? (
|
||||
|
||||
Reference in New Issue
Block a user