Skip to content

Commit 2e59472

Browse files
fix:onclick upgrade button navigate user to new window
1 parent ef5ac7d commit 2e59472

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

apps/OpenSign/src/pages/PlaceHolderSign.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,10 +1804,7 @@ function PlaceHolderSign() {
18041804

18051805
{!isSubscribe && isEnableSubscription && (
18061806
<div className="mt-2">
1807-
<Upgrade
1808-
message="Upgrade to customize Email"
1809-
newWindow={true}
1810-
/>
1807+
<Upgrade message="Upgrade to customize Email" />
18111808
</div>
18121809
)}
18131810
</div>

apps/OpenSign/src/primitives/Upgrade.js

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

5-
function Upgrade({ message, newWindow }) {
6-
const navigation = useNavigate();
7-
4+
function Upgrade({ message }) {
85
return (
96
<sup>
107
<span
118
onClick={() => {
12-
if (newWindow) {
13-
const url = window.location.origin + "/subscription";
14-
openInNewTab(url);
15-
} else {
16-
navigation("/subscription");
17-
}
9+
const url = window.location.origin + "/subscription";
10+
openInNewTab(url);
1811
}}
1912
className="text-blue-800 text-sm cursor-pointer underline"
2013
>

0 commit comments

Comments
 (0)