[fix] artist bug for creatures

This commit is contained in:
Daniel
2019-03-22 01:00:45 -04:00
parent 741a55306c
commit be9aea9bfb
2 changed files with 9 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -7,6 +7,14 @@ import {observer, inject} from 'mobx-react';
import Single from './_base';
import {PageNotFound, Rarity, Unique, Name, Element, Mugic, Discipline, Ability, Tribe} from '../../Snippets';
function Artist(props) {
let artists = [];
props.artist.split(/(?=, )/).forEach((artist, i) => {
artists.push(<Link key={i} to={`/portal/Search/?${artist.replace(", ", "")}`}>{artist}</Link>);
});
return (<div className="ability">{artists}</div>)
}
@inject((stores, props, context) => props) @observer
export default class SingleCreature extends React.Component {