mirror of
https://github.com/flarum/core.git
synced 2025-07-25 18:51:40 +02:00
Don't apply background color if there is none
This commit is contained in:
@@ -26,10 +26,11 @@ export default class UserCard extends Component {
|
|||||||
view() {
|
view() {
|
||||||
const user = this.props.user;
|
const user = this.props.user;
|
||||||
const controls = UserControls.controls(user, this).toArray();
|
const controls = UserControls.controls(user, this).toArray();
|
||||||
|
const color = user.color();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'UserCard ' + (this.props.className || '')}
|
<div className={'UserCard ' + (this.props.className || '')}
|
||||||
style={{backgroundColor: user.color()}}>
|
style={color ? {backgroundColor: color} : ''}>
|
||||||
<div className="darkenBackground">
|
<div className="darkenBackground">
|
||||||
|
|
||||||
<div className="container">
|
<div className="container">
|
||||||
|
Reference in New Issue
Block a user