fix:onclick upgrade button navigate user to new window

This commit is contained in:
RaktimaNXG
2024-05-22 18:51:57 +05:30
parent ef5ac7d626
commit 2e5947279f
2 changed files with 4 additions and 14 deletions
+1 -4
View File
@@ -1804,10 +1804,7 @@ function PlaceHolderSign() {
{!isSubscribe && isEnableSubscription && (
<div className="mt-2">
<Upgrade
message="Upgrade to customize Email"
newWindow={true}
/>
<Upgrade message="Upgrade to customize Email" />
</div>
)}
</div>
+3 -10
View File
@@ -1,20 +1,13 @@
import React from "react";
import { useNavigate } from "react-router-dom";
import { openInNewTab } from "../constant/Utils";
function Upgrade({ message, newWindow }) {
const navigation = useNavigate();
function Upgrade({ message }) {
return (
<sup>
<span
onClick={() => {
if (newWindow) {
const url = window.location.origin + "/subscription";
openInNewTab(url);
} else {
navigation("/subscription");
}
const url = window.location.origin + "/subscription";
openInNewTab(url);
}}
className="text-blue-800 text-sm cursor-pointer underline"
>