mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-29 11:04:20 +01:00
handle expired subscriptions
This commit is contained in:
@@ -358,6 +358,8 @@ export default {
|
||||
error_no_plan: "No plans found",
|
||||
error_failure: "Couldn't subscribe",
|
||||
error_no_subscription: "No existing subscription found",
|
||||
error_expired_subscription:
|
||||
"Your subscription has expired, click join to renew",
|
||||
satisfaction: "Smug satisfaction",
|
||||
gifting: "Gifting",
|
||||
multi_device: "Multi-device access",
|
||||
|
||||
@@ -113,6 +113,17 @@ function PlusCTA() {
|
||||
new Error(i18n.t("settings.plus.error_no_subscription"))
|
||||
);
|
||||
}
|
||||
|
||||
if (
|
||||
state.subscription_timestamp &&
|
||||
state.subscription_timestamp < Math.ceil(Date.now() / 1000)
|
||||
) {
|
||||
setError(
|
||||
new Error(
|
||||
i18n.t("settings.plus.error_expired_subscription")
|
||||
)
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
setError(eify(e));
|
||||
|
||||
Reference in New Issue
Block a user