From d505d63c6bc16815e1f73e9437c946aabefb5246 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Tue, 14 Jul 2020 18:45:48 -0500 Subject: [PATCH] Added isStatic prop to GroupListItem for non-navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Added: - isStatic prop to GroupListItem for non-navigation for Introduction page --- app/javascript/gabsocial/components/group_list_item.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/javascript/gabsocial/components/group_list_item.js b/app/javascript/gabsocial/components/group_list_item.js index c2636a2e..dac49c33 100644 --- a/app/javascript/gabsocial/components/group_list_item.js +++ b/app/javascript/gabsocial/components/group_list_item.js @@ -10,6 +10,7 @@ import { shortNumberFormat } from '../utils/numbers' import Button from './button' import Image from './image' import Text from './text' +import Dummy from './dummy' const messages = defineMessages({ members: { id: 'groups.card.members', defaultMessage: 'Members' }, @@ -40,6 +41,7 @@ class GroupListItem extends ImmutablePureComponent { isAddable: PropTypes.bool, isHidden: PropTypes.bool, isLast: PropTypes.bool, + isStatic: PropTypes.bool, onToggleMembership: PropTypes.func.isRequired, relationships: ImmutablePropTypes.map, } @@ -72,6 +74,7 @@ class GroupListItem extends ImmutablePureComponent { isAddable, isLast, isHidden, + isStatic, relationships, } = this.props const { hovering } = this.state @@ -112,9 +115,11 @@ class GroupListItem extends ImmutablePureComponent { const addButtonColor = isMember ? hovering ? 'danger' : 'tertiary' : 'brand' const addButtonTitle = isMember ? hovering ? 'Leave Group' : 'You are a member' : 'Join Group' + const Wrapper = !isStatic ? NavLink : Dummy + return (
- @@ -140,7 +145,7 @@ class GroupListItem extends ImmutablePureComponent {
- +
{ relationships &&