Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bufferapp/upgrade-to-pro

Package Overview
Dependencies
Maintainers
34
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bufferapp/upgrade-to-pro - npm Package Compare versions

Comparing version 1.56.0 to 1.74.1

2

components/LockedContent/index.jsx

@@ -66,3 +66,3 @@ import React from 'react';

<Locked size="extraLarge" />
<Button label="Unlock with Analyze Premium" onClick={this.showModal.bind(this)} />
<Button label="Upgrade to Unlock" onClick={this.showModal.bind(this)} />
</LockContent>

@@ -69,0 +69,0 @@ {children}

@@ -1,11 +0,7 @@

import React from 'react';
import PropTypes from 'prop-types';
import React, { useContext } from 'react';
import styled from 'styled-components';
import Button from '@bufferapp/ui/Button';
import Modal from '@bufferapp/ui/Modal';
import Text from '@bufferapp/ui/Text';
import { ModalContext, MODALS, useUser } from '@bufferapp/app-shell';
const ModalWrapper = styled.section`
`;
const Wrapper = styled.section`

@@ -21,53 +17,38 @@ width: 100%;

class UpgradeToPro extends React.Component {
state = {
open: false,
}
function UpgradeToPro({
hide,
title,
description,
}) {
const user = useUser();
const context = useContext(ModalContext);
showModal() {
this.setState({
open: true,
});
}
hideModal() {
this.setState({
open: false,
});
}
render() {
return (
<ModalWrapper>
<Modal
secondaryAction={{
label: 'Dismiss',
callback: this.props.hide,
}}
action={{
label: 'Upgrade to Analyze Premium today',
callback: () => window.location = 'https://account.buffer.com/analyze?upgradeToPremium=true',
}}
>
<Wrapper>
<Text type="h2">{this.props.title}</Text>
<Text type="p">{this.props.description}</Text>
</Wrapper>
</Modal>
</ModalWrapper>
);
return (
<Modal
secondaryAction={{
label: 'Dismiss',
callback: hide,
}}
action={{
label: 'Upgrade now',
callback: () => {
if (user &&
user.currentOrganization &&
user.currentOrganization.isOneBufferOrganization
) {
hide()
context.openModal(MODALS.planSelector, { isUpgradeIntent: true })
} else {
window.location = 'https://account.buffer.com/analyze?upgradeToPremium=true'
}
},
}}
>
<Wrapper>
<Text type="h2">{title}</Text>
<Text type="p">{description}</Text>
</Wrapper>
</Modal>);
}
}
UpgradeToPro.defaultProps = {
type: null,
};
UpgradeToPro.propTypes = {
label: PropTypes.string.isRequired,
upgradeToPro: PropTypes.func.isRequired,
type: PropTypes.string,
};
export default UpgradeToPro;
{
"name": "@bufferapp/upgrade-to-pro",
"version": "1.56.0",
"version": "1.74.1",
"description": "Upgrade to Pro components",

@@ -19,3 +19,3 @@ "main": "index.js",

},
"gitHead": "cc22a98fe20db394dc94c4d849391971fab903f3"
"gitHead": "b4c7c64f1287f4b33ecc792471af2d2f4978d595"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc