mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 15:13:42 +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() {
|
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">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user