Skip to content
Snippets Groups Projects
Commit 76decc8a authored by Anton Kulyk's avatar Anton Kulyk Committed by Nemanja
Browse files

Rename Header's `showBadge` into `hasBadge`

parent 1310da78
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@ const propTypes = {
isEditingInfo: PropTypes.bool,
item: PropTypes.object.isRequired,
objectType: PropTypes.string.isRequired,
showBadge: PropTypes.bool,
hasBadge: PropTypes.bool,
children: PropTypes.node,
setItemAttributeFn: PropTypes.func,
onHeaderModalDone: PropTypes.func,
......@@ -108,7 +108,7 @@ class Header extends Component {
}
render() {
const { item, showBadge } = this.props;
const { item, hasBadge } = this.props;
const hasLastEditInfo = !!item["last-edit-info"];
let titleAndDescription;
......@@ -171,13 +171,13 @@ class Header extends Component {
<span className="inline-block mb1">{titleAndDescription}</span>
{attribution}
<Flex direction="row" align="center">
{showBadge && (
{hasBadge && (
<CollectionBadge
collectionId={item.collection_id}
analyticsContext={this.props.analyticsContext}
/>
)}
{showBadge && hasLastEditInfo && (
{hasBadge && hasLastEditInfo && (
<span className="mx1 text-light text-smaller"></span>
)}
{hasLastEditInfo && <LastEditInfoLabel item={item} />}
......
......@@ -385,7 +385,7 @@ export default class DashboardHeader extends Component {
analyticsContext="Dashboard"
item={dashboard}
isEditing={this.props.isEditing}
showBadge={!this.props.isEditing && !this.props.isFullscreen}
hasBadge={!this.props.isEditing && !this.props.isFullscreen}
isEditingInfo={this.props.isEditing}
headerButtons={this.getHeaderButtons()}
editWarning={this.getEditWarning(dashboard)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment