mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-24 19:59:12 +00:00
fix(ServerCard): resolve name color regression
This commit is contained in:
parent
96d67fd42e
commit
1148a564ac
2 changed files with 6 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
import React, { Component } from 'react'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
import { colorToCSS } from '../../utils'
|
||||
import './ServerCard.sass'
|
||||
|
||||
class ServerCard extends Component {
|
||||
|
@ -59,7 +60,7 @@ class ServerCard extends Component {
|
|||
<div className="server-list__item__info">
|
||||
<b>{s.get('name')}</b>
|
||||
<br />
|
||||
<span style={{ color: gm.get('color') }}>
|
||||
<span style={{ color: colorToCSS(gm.get('color')) }}>
|
||||
{gm.get('nick') || user.get('username')}
|
||||
</span>{' '}
|
||||
{icon}
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
import color from 'color'
|
||||
|
||||
export const msgToReal = msg => msg.replace(/</g, '<').replace(/\n/g, '<br />')
|
||||
|
||||
export const colorToCSS = colorInt => color(colorInt).hsl().string()
|
Loading…
Add table
Reference in a new issue