mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
fixed signup/cancelation bugs relating to session
This commit is contained in:
1 parent
3245b2b6f8
commit
3438fa769e
8 files changed
+8
-8
No files matched your search
+1
-1
@@ -99,7 +99,7 @@ export default function UserProfileInfo() {
|
||||
|
||||
if (sessionWrapper.isLoggedIn()) {
|
||||
if (sessionWrapper.userTokenMatches(userData.user_token)) {
|
||||
if (sessionSubscriptions?.hasPaidFeatures()) {
|
||||
if (!sessionSubscriptions?.hasPaidFeatures()) {
|
||||
const upgradeLinkUrl = WebUrl.pricingPage();
|
||||
|
||||
upgradeButton = (
|
||||
|
||||
+1
-1
@@ -327,7 +327,7 @@ function SessionTtsInferenceResultList(props: Props) {
|
||||
let upgradeNotice = <></>;
|
||||
|
||||
// Ask non-premium users to upgrade
|
||||
if (results.length !== 0 && sessionSubscriptions?.hasPaidFeatures()) {
|
||||
if (results.length !== 0 && !sessionSubscriptions?.hasPaidFeatures()) {
|
||||
if (loggedIn) {
|
||||
upgradeNotice = (
|
||||
<div className="d-flex flex-column gap-3 sticky-top zi-2">
|
||||
|
||||
+1
-1
@@ -229,7 +229,7 @@ function SessionVoiceConversionResultsList() {
|
||||
let upgradeNotice = <></>;
|
||||
|
||||
// Ask non-premium users to upgrade
|
||||
if (results.length !== 0 && sessionSubscriptions?.hasPaidFeatures()) {
|
||||
if (results.length !== 0 && !sessionSubscriptions?.hasPaidFeatures()) {
|
||||
if (loggedIn) {
|
||||
upgradeNotice = (
|
||||
<div className="d-flex flex-column gap-3 sticky-top zi-2">
|
||||
|
||||
+1
-1
@@ -188,7 +188,7 @@ function SessionVoiceDesignerInferenceResultsList() {
|
||||
let upgradeNotice = <></>;
|
||||
|
||||
// Ask non-premium users to upgrade
|
||||
if (results.length !== 0 && sessionSubscriptions?.hasPaidFeatures()) {
|
||||
if (results.length !== 0 && !sessionSubscriptions?.hasPaidFeatures()) {
|
||||
upgradeNotice = (
|
||||
<div className="d-flex flex-column gap-3 sticky-top zi-2">
|
||||
<div className="alert alert-warning alert-cta mb-0">
|
||||
|
||||
@@ -86,7 +86,7 @@ function NewsPage() {
|
||||
|
||||
let subscriberPart = <></>;
|
||||
let subscribeButton = <></>;
|
||||
if (sessionSubscriptions?.hasPaidFeatures()) {
|
||||
if (!sessionSubscriptions?.hasPaidFeatures()) {
|
||||
subscriberPart = (
|
||||
<p>
|
||||
If you'd like an ad-free experience,{" "}
|
||||
|
||||
@@ -54,7 +54,7 @@ function PricingPage() {
|
||||
break;
|
||||
}
|
||||
|
||||
if (sessionWrapper.isLoggedIn()) {
|
||||
if (!sessionWrapper.isLoggedIn()) {
|
||||
// TODO: This needs to bring the user back to purchase flow.
|
||||
Analytics.premiumBounceToSignup();
|
||||
|
||||
|
||||
+1
-1
@@ -211,7 +211,7 @@ function ProfileEditFc() {
|
||||
return <span />;
|
||||
}
|
||||
|
||||
if (!!userData && sessionWrapper.canEditUserProfile(username)) {
|
||||
if (!!userData && !sessionWrapper.canEditUserProfile(username)) {
|
||||
// Loading and we don't have access.
|
||||
history.push(userProfilePage);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ function SignupPage(props: Props) {
|
||||
|
||||
usePrefixedDocumentTitle("Create an account");
|
||||
|
||||
if (sessionWrapper.isLoggedIn()) {
|
||||
if (!sessionWrapper.isLoggedIn()) {
|
||||
return (
|
||||
<div className="container py-5">
|
||||
<div className="py-5">
|
||||
|
||||
Reference in new issue
Block a user