mirror of https://github.com/vector-im/riot-web
Iterate EntityTile
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
8fb788ae56
commit
f08b92309f
|
@ -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 New Issue