Added ProUpgradeModal to group creation action buttons and page
• Added: - ProUpgradeModal to group creation action buttons and page if not pro or if not admin of edit group
This commit is contained in:
@@ -8,6 +8,8 @@ import Text from '../components/text'
|
||||
import DefaultLayout from '../layouts/default_layout'
|
||||
import GroupsCollection from '../features/groups_collection'
|
||||
import WrappedBundle from '../features/ui/util/wrapped_bundle'
|
||||
import { openModal } from '../actions/modal'
|
||||
import { MODAL_PRO_UPGRADE } from '../constants'
|
||||
import {
|
||||
GroupsPanel,
|
||||
LinkFooter,
|
||||
@@ -15,6 +17,10 @@ import {
|
||||
|
||||
class GroupsPage extends React.PureComponent {
|
||||
|
||||
handleOpenProUpgradeModal = () => {
|
||||
this.props.dispatch(openModal(MODAL_PRO_UPGRADE))
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
activeTab,
|
||||
@@ -66,7 +72,8 @@ class GroupsPage extends React.PureComponent {
|
||||
{
|
||||
title: 'Create',
|
||||
icon: 'add',
|
||||
to: '/groups/create',
|
||||
to: isPro ? '/groups/create' : undefined,
|
||||
onClick: isPro ? undefined : this.handleOpenProUpgradeModal,
|
||||
},
|
||||
]}
|
||||
tabs={tabs}
|
||||
|
||||
Reference in New Issue
Block a user