@bufferapp/upgrade-to-pro
Advanced tools
Comparing version 1.77.0 to 2.0.0-beta-18
@@ -61,3 +61,3 @@ import React from 'react'; | ||
// analyze-UnlockStoriesAnalytics-lockedContent-upgrade-1 | ||
const cta = `analyze-${title.split(' ').join('')}-lockedContent-upgrade-1`; | ||
const cta = `${title.split(' ').join('')}-lockedContent-upgrade-1`; | ||
return ( | ||
@@ -64,0 +64,0 @@ <React.Fragment> |
@@ -1,2 +0,2 @@ | ||
import React, { useContext } from 'react'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
@@ -17,8 +17,3 @@ import Modal from '@bufferapp/ui/Modal'; | ||
function UpgradeToPro({ | ||
hide, | ||
title, | ||
description, | ||
cta | ||
}) { | ||
function UpgradeToPro({ hide, title, description, cta }) { | ||
const account = useAccount(); | ||
@@ -30,15 +25,20 @@ | ||
label: 'Dismiss', | ||
callback: hide, | ||
callback: hide | ||
}} | ||
action={{ | ||
label: 'Upgrade now', | ||
callback: () => { | ||
if (account?.currentOrganization?.isOneBufferOrganization) { | ||
hide() | ||
const { MODALS, actions } = window?.appshell || {}; | ||
actions.openModal(MODALS.planSelector, { cta, isUpgradeIntent: true }) | ||
} else { | ||
window.location = 'https://account.buffer.com/analyze?upgradeToPremium=true' | ||
} | ||
}, | ||
callback: () => { | ||
if (account?.currentOrganization?.isOneBufferOrganization) { | ||
hide(); | ||
const { MODALS, actions } = window?.appshell || {}; | ||
actions.openModal(MODALS.planSelector, { | ||
cta, | ||
isUpgradeIntent: true, | ||
upgradePathName: 'analyze-upgrade', | ||
}); | ||
} else { | ||
window.location = | ||
'https://account.buffer.com/new-plans/?cta=analyzeUpgradeNow-migration-cta'; | ||
} | ||
}, | ||
}} | ||
@@ -50,5 +50,6 @@ > | ||
</Wrapper> | ||
</Modal>); | ||
</Modal> | ||
); | ||
} | ||
export default UpgradeToPro; |
{ | ||
"name": "@bufferapp/upgrade-to-pro", | ||
"version": "1.77.0", | ||
"version": "2.0.0-beta-18", | ||
"description": "Upgrade to Pro components", | ||
"main": "index.js", | ||
"types": "types/index.d.ts", | ||
"scripts": { | ||
@@ -13,2 +14,3 @@ "start": "start-storybook -p 9001", | ||
"devDependencies": { | ||
"@bufferapp/analyze-account": "2.0.0-beta-7", | ||
"@storybook/react": "3.1.3", | ||
@@ -15,0 +17,0 @@ "storybook-addon-a11y": "3.0.0" |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
11372
15
252
3
2