fix: onclick upgrade to customize email button redirect new window of subscription page

This commit is contained in:
RaktimaNXG
2024-04-17 21:02:05 +05:30
parent 5422fefc54
commit 4cbd7e74f7
2 changed files with 14 additions and 4 deletions
+4 -2
View File
@@ -907,7 +907,6 @@ function PlaceHolderSign() {
updateExpiryDate.setDate(updateExpiryDate.getDate() + addExtraDays);
//filter label widgets after add label widgets data on pdf
const filterPrefill = signerPos.filter((data) => data.Role !== "prefill");
try {
if (updateExpiryDate) {
data = {
@@ -1769,7 +1768,10 @@ function PlaceHolderSign() {
)}
{!isSubscribe && isEnableSubscription && (
<Upgrade message="Upgrade to customize Email" />
<Upgrade
message="Upgrade to customize Email"
newWindow={true}
/>
)}
</div>
</>
+10 -2
View File
@@ -1,13 +1,21 @@
import React from "react";
import { useNavigate } from "react-router-dom";
import { openInNewTab } from "../constant/Utils";
function Upgrade({ message }) {
function Upgrade({ message, newWindow }) {
const navigation = useNavigate();
return (
<sup>
<span
onClick={() => navigation("/subscription")}
onClick={() => {
if (newWindow) {
const url = window.location.origin + "/subscription";
openInNewTab(url);
} else {
navigation("/subscription");
}
}}
className="text-blue-800 text-sm cursor-pointer underline"
>
{message ? message : "Upgrade now"}