@bufferapp/upgrade-to-pro
Advanced tools
Comparing version 1.74.1 to 1.77.0
@@ -56,2 +56,8 @@ import React from 'react'; | ||
const { children } = this.props; | ||
const title = this.props?.title || '' | ||
// creates a new string from the title by removing whitespace and uses it in the cta view | ||
// e.g. "Unlock Stories Analytics" will become "UnlockStoriesAnalytics" and the CTA will be | ||
// analyze-UnlockStoriesAnalytics-lockedContent-upgrade-1 | ||
const cta = `analyze-${title.split(' ').join('')}-lockedContent-upgrade-1`; | ||
return ( | ||
@@ -61,4 +67,5 @@ <React.Fragment> | ||
hide={this.hideModal.bind(this)} | ||
title={this.props.title} | ||
title={title} | ||
description={this.props.description} | ||
cta={cta} | ||
/>} | ||
@@ -65,0 +72,0 @@ <Lock> |
@@ -5,3 +5,3 @@ import React, { useContext } from 'react'; | ||
import Text from '@bufferapp/ui/Text'; | ||
import { ModalContext, MODALS, useUser } from '@bufferapp/app-shell'; | ||
import { useAccount } from '@bufferapp/analyze-account'; | ||
@@ -22,5 +22,5 @@ const Wrapper = styled.section` | ||
description, | ||
cta | ||
}) { | ||
const user = useUser(); | ||
const context = useContext(ModalContext); | ||
const account = useAccount(); | ||
@@ -36,8 +36,6 @@ return ( | ||
callback: () => { | ||
if (user && | ||
user.currentOrganization && | ||
user.currentOrganization.isOneBufferOrganization | ||
) { | ||
if (account?.currentOrganization?.isOneBufferOrganization) { | ||
hide() | ||
context.openModal(MODALS.planSelector, { isUpgradeIntent: true }) | ||
const { MODALS, actions } = window?.appshell || {}; | ||
actions.openModal(MODALS.planSelector, { cta, isUpgradeIntent: true }) | ||
} else { | ||
@@ -44,0 +42,0 @@ window.location = 'https://account.buffer.com/analyze?upgradeToPremium=true' |
{ | ||
"name": "@bufferapp/upgrade-to-pro", | ||
"version": "1.74.1", | ||
"version": "1.77.0", | ||
"description": "Upgrade to Pro components", | ||
@@ -19,3 +19,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "b4c7c64f1287f4b33ecc792471af2d2f4978d595" | ||
"gitHead": "975cf467d03ca2ef0c494d7c77893343ca0b968c" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11163
250
1