mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-23 16:12:34 +02:00
fix: onclick upgrade to customize email button redirect new window of subscription page
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
|
||||
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user