Skip to content

Commit

Permalink
fix(FEC-13709): remove player top bar if there is no content in it (#53)
Browse files Browse the repository at this point in the history
### Description of the Changes

- bugfix.

do not render the `DisplayedBarComponentWrapper` root element in case
there are no components to render within.

related PR: kaltura/playkit-js-ui#883

Solves FEC-13709

### CheckLists

- [ ] changes have been done against master branch, and PR does not
conflict
- [ ] new unit / functional tests have been added (whenever applicable)
- [ ] test are passing in local environment
- [ ] Travis tests are passing (or test results are not worse than on
master branch :))
- [ ] Docs have been updated
  • Loading branch information
lianbenjamin authored May 15, 2024
1 parent 829dac9 commit e0a5641
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class DisplayedBar extends Component<DisplayedBarProps & PropsFromRedux,

render(): ComponentChild {
const { displayedControls, dropdownControls } = this.splitControlsIntoDisplayedAndDropdown();
return (
return displayedControls.length > 0 ? (
<div className={styles.rightUpperBarWrapperContainer}>
{displayedControls.map(({ id, component, onClick, componentRef }) => {
const IconWrapperComponent = component!;
Expand All @@ -104,6 +104,6 @@ export class DisplayedBar extends Component<DisplayedBarProps & PropsFromRedux,
<MoreIcon showDropdown={this.state.showDropdown} onClick={this.handleOnClick} icons={dropdownControls} />
)}
</div>
);
) : undefined;
}
}

0 comments on commit e0a5641

Please sign in to comment.