Simplify things

This commit is contained in:
Steffen Kolmer 2021-08-28 14:00:18 +02:00
parent 9fdc5659b7
commit 3ef9584f68

View file

@ -122,13 +122,10 @@ export default class EventTilePreview extends React.Component<IProps, IState> {
const className = classnames(this.props.className, { const className = classnames(this.props.className, {
"mx_IRCLayout": this.props.layout == Layout.IRC, "mx_IRCLayout": this.props.layout == Layout.IRC,
"mx_GroupLayout": this.props.layout == Layout.Group, "mx_GroupLayout": this.props.layout == Layout.Group,
"mx_EventTilePreview_loader": !this.props.userId
}); });
if (!this.props.userId) { if (!this.props.userId) return <div className={className}><Spinner /></div>;
return <div className={classnames("mx_EventTilePreview_loader", className)}>
<Spinner />
</div>;
}
const event = this.fakeEvent(this.state); const event = this.fakeEvent(this.state);