fix: do not render favorite favStars and filters for anonymous user (#14120)

* fix: do not render favorite favStar and filter for anonymous user

* fix: prevent anonymous user to trigger the favstar view route

* fix: lint over previous commit

* fix: linter follow-up
This commit is contained in:
Cedric Gampert
2021-05-14 17:05:50 +02:00
committed by GitHub
parent 97c9e37c24
commit 74473e2ad1
6 changed files with 97 additions and 67 deletions

View File

@@ -148,13 +148,15 @@ export class ExploreChartHeader extends React.PureComponent {
{this.props.slice && (
<StyledButtons>
<FaveStar
itemId={this.props.slice.slice_id}
fetchFaveStar={this.props.actions.fetchFaveStar}
saveFaveStar={this.props.actions.saveFaveStar}
isStarred={this.props.isStarred}
showTooltip
/>
{this.props.userId && (
<FaveStar
itemId={this.props.slice.slice_id}
fetchFaveStar={this.props.actions.fetchFaveStar}
saveFaveStar={this.props.actions.saveFaveStar}
isStarred={this.props.isStarred}
showTooltip
/>
)}
<PropertiesModal
show={this.state.isPropertiesModalOpen}
onHide={this.closePropertiesModal}