Iterate EntityTile
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
8fb788ae56
commit
f08b92309f
1 changed files with 3 additions and 7 deletions
|
@ -31,8 +31,8 @@ enum PowerStatus {
|
|||
}
|
||||
|
||||
const PowerLabel: Record<PowerStatus, string> = {
|
||||
"admin": _td("Admin"),
|
||||
"moderator": _td("Mod"),
|
||||
[PowerStatus.Admin]: _td("Admin"),
|
||||
[PowerStatus.Moderator]: _td("Mod"),
|
||||
}
|
||||
|
||||
const PRESENCE_CLASS = {
|
||||
|
@ -84,7 +84,7 @@ interface IState {
|
|||
}
|
||||
|
||||
@replaceableComponent("views.rooms.EntityTile")
|
||||
export default class EntityTile extends React.Component<IProps, IState> {
|
||||
export default class EntityTile extends React.PureComponent<IProps, IState> {
|
||||
static defaultProps = {
|
||||
onClick: () => {},
|
||||
presenceState: "offline",
|
||||
|
@ -103,10 +103,6 @@ export default class EntityTile extends React.Component<IProps, IState> {
|
|||
};
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps: IProps, nextState: IState) {
|
||||
if (this.state.hover !== nextState.hover) return true;
|
||||
}
|
||||
|
||||
render() {
|
||||
const mainClassNames = {
|
||||
"mx_EntityTile": true,
|
||||
|
|
Loading…
Reference in a new issue