fix: correctly refresh cta banner
This commit is contained in:
@@ -386,6 +386,7 @@ class Footer extends AbstractComponent<Props, State> {
|
||||
<UpgradeNow
|
||||
application={this.application}
|
||||
featuresController={this.viewControllerManager.featuresController}
|
||||
subscriptionContoller={this.viewControllerManager.subscriptionController}
|
||||
/>
|
||||
{this.state.showBetaWarning && (
|
||||
<Fragment>
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
import { WebApplication } from '@/Application/Application'
|
||||
import { FeaturesController } from '@/Controllers/FeaturesController'
|
||||
import { SubscriptionController } from '@/Controllers/Subscription/SubscriptionController'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
import { loadPurchaseFlowUrl } from '../PurchaseFlow/PurchaseFlowFunctions'
|
||||
|
||||
type Props = {
|
||||
application: WebApplication
|
||||
featuresController: FeaturesController
|
||||
subscriptionContoller: SubscriptionController
|
||||
}
|
||||
|
||||
const UpgradeNow = ({ application, featuresController }: Props) => {
|
||||
const UpgradeNow = ({ application, featuresController, subscriptionContoller }: Props) => {
|
||||
const shouldShowCTA = !featuresController.hasFolders
|
||||
const hasAccount = application.hasAccount()
|
||||
const hasAccount = subscriptionContoller.hasAccount
|
||||
|
||||
if (hasAccount && application.hideSubscriptionMarketing) {
|
||||
if (hasAccount && subscriptionContoller.hideSubscriptionMarketing) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,11 @@ const Navigation: FunctionComponent<Props> = ({ application }) => {
|
||||
label="Go to items list"
|
||||
icon="chevron-left"
|
||||
/>
|
||||
<UpgradeNow application={application} featuresController={viewControllerManager.featuresController} />
|
||||
<UpgradeNow
|
||||
application={application}
|
||||
subscriptionContoller={viewControllerManager.subscriptionController}
|
||||
featuresController={viewControllerManager.featuresController}
|
||||
/>
|
||||
<RoundIconButton
|
||||
className="ml-2.5 bg-default"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user