Skip to content

Commit 4cbd7e7

Browse files
fix: onclick upgrade to customize email button redirect new window of subscription page
1 parent 5422fef commit 4cbd7e7

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

apps/OpenSign/src/pages/PlaceHolderSign.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,6 @@ function PlaceHolderSign() {
907907
updateExpiryDate.setDate(updateExpiryDate.getDate() + addExtraDays);
908908
//filter label widgets after add label widgets data on pdf
909909
const filterPrefill = signerPos.filter((data) => data.Role !== "prefill");
910-
911910
try {
912911
if (updateExpiryDate) {
913912
data = {
@@ -1769,7 +1768,10 @@ function PlaceHolderSign() {
17691768
)}
17701769

17711770
{!isSubscribe && isEnableSubscription && (
1772-
<Upgrade message="Upgrade to customize Email" />
1771+
<Upgrade
1772+
message="Upgrade to customize Email"
1773+
newWindow={true}
1774+
/>
17731775
)}
17741776
</div>
17751777
</>

apps/OpenSign/src/primitives/Upgrade.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
import React from "react";
22
import { useNavigate } from "react-router-dom";
3+
import { openInNewTab } from "../constant/Utils";
34

4-
function Upgrade({ message }) {
5+
function Upgrade({ message, newWindow }) {
56
const navigation = useNavigate();
67

78
return (
89
<sup>
910
<span
10-
onClick={() => navigation("/subscription")}
11+
onClick={() => {
12+
if (newWindow) {
13+
const url = window.location.origin + "/subscription";
14+
openInNewTab(url);
15+
} else {
16+
navigation("/subscription");
17+
}
18+
}}
1119
className="text-blue-800 text-sm cursor-pointer underline"
1220
>
1321
{message ? message : "Upgrade now"}

0 commit comments

Comments
 (0)