mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 06:03:39 +08:00
Don't apply background color if there is none
This commit is contained in:
parent
b7264e8a71
commit
9db026de95
|
@ -26,10 +26,11 @@ export default class UserCard extends Component {
|
|||
view() {
|
||||
const user = this.props.user;
|
||||
const controls = UserControls.controls(user, this).toArray();
|
||||
const color = user.color();
|
||||
|
||||
return (
|
||||
<div className={'UserCard ' + (this.props.className || '')}
|
||||
style={{backgroundColor: user.color()}}>
|
||||
style={color ? {backgroundColor: color} : ''}>
|
||||
<div className="darkenBackground">
|
||||
|
||||
<div className="container">
|
||||
|
|
Loading…
Reference in New Issue
Block a user