1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-11 09:32:51 +00:00

little bit of everything - it's been a long day

This commit is contained in:
2018-01-14 23:46:15 -06:00
parent d9d7f2d202
commit efbee265d3
25 changed files with 298 additions and 125 deletions

View File

@@ -1,9 +1,9 @@
import { find, filter, get } from 'lodash';
import { AvatarModel } from '../model';
const getAvatar = (title: string): any => {
const getAvatar = (title?: string): any => {
const av = find(avatarList, { title });
return get(av, 'imageSrc');
return get(av, 'imageSrc') || avatarList[0].imageSrc;
};
const getClass = (index: number): {id: number, name: string; races: number[] } => {
@@ -66,6 +66,11 @@ const classList = [
];
const avatarList: AvatarModel[] = [
{
raceId: 0,
title: 'unknown',
imageSrc: require('../assets/avatars/unknown.gif'),
},
{
raceId: 1,
title: 'dwarf_f',