Add hint box with dynamic join button

This commit is contained in:
zbettenbuk
2018-02-26 18:39:48 -06:00
committed by Lyubo Marinov
parent 547ddee3a5
commit e23d4317eb
8 changed files with 178 additions and 17 deletions
@@ -9,6 +9,11 @@ import { appNavigate } from '../../app';
*/
type Props = {
/**
* Indicates if the list is disabled or not.
*/
disabled: boolean,
/**
* The redux store's {@code dispatch} function.
*/
@@ -31,7 +36,9 @@ export default class AbstractRecentList extends Component<Props> {
* @returns {void}
*/
_onJoin(room) {
room && this.props.dispatch(appNavigate(room));
const { disabled, dispatch } = this.props;
!disabled && room && dispatch(appNavigate(room));
}
/**