mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-08-25 09:02:33 +02:00
fix: change message of already subscribed
This commit is contained in:
@@ -22,6 +22,7 @@ const Header = ({ showSidebar }) => {
|
||||
};
|
||||
useEffect(() => {
|
||||
checkIsSubscribed();
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
async function checkIsSubscribed() {
|
||||
const currentUser = Parse.User.current();
|
||||
|
||||
@@ -51,7 +51,7 @@ const PlanSubscriptions = () => {
|
||||
const res = await Parse.Cloud.run("freesubscription", params);
|
||||
if (res.status === "success" && res.result === "already subscribed!") {
|
||||
setIsLoader(false);
|
||||
alert("You have already subscription of free plan");
|
||||
alert("You have already subscribed to plan!");
|
||||
} else if (res.status === "success") {
|
||||
setIsLoader(false);
|
||||
navigate("/");
|
||||
|
||||
@@ -19,6 +19,8 @@ export default async function SubscribeFree(request) {
|
||||
console.log('err ', err);
|
||||
return { status: 'error', result: err.message };
|
||||
}
|
||||
} else if (extUser?.get('Next_billing_date') > new Date()) {
|
||||
return { status: 'success', result: 'already subscribed!' };
|
||||
} else {
|
||||
try {
|
||||
const extUpdate = new Parse.Object('contracts_Users');
|
||||
|
||||
Reference in New Issue
Block a user