tidies for software icons in detailsExpander

ref #429
This commit is contained in:
Collin M. Barrett 2018-09-15 22:51:23 -05:00
parent 365d8d9780
commit 8a2c2ae0f5
2 changed files with 6 additions and 3 deletions

View file

@ -11,6 +11,7 @@ public class ListSyntaxDtoMappingProfile : Profile
{
public ListSyntaxDtoMappingProfile() =>
CreateMap<Syntax, ListSyntaxDto>()
.ForMember(d => d.SupportedSoftware, o => o.MapFrom(s => s.SoftwareSyntaxes.Select(ss => ss.Software)));
.ForMember(d => d.SupportedSoftware,
o => o.MapFrom(s => s.SoftwareSyntaxes.Select(ss => ss.Software).OrderBy(sw => sw.Name)));
}
}

View file

@ -11,7 +11,6 @@ import { Syntax } from "./Syntax";
import { Tags } from "./Tags";
import { UpdatedDate } from "./UpdatedDate";
interface IProps {
description: string;
descriptionSourceUrl: string;
@ -31,7 +30,10 @@ export const InfoCard = (props: IProps) => {
<Tags tags={props.tags}/>
<div className="d-md-none">
{props.syntax.supportedSoftware.map(
(s: ISyntaxSupportedSoftwareDto, i: any) => <SoftwareIcon id={s.id} key={i}/>)}
(s: ISyntaxSupportedSoftwareDto, i: any) =>
<a href={s.homeUrl} title={`View ${s.name}'s homepage.`} key={i}>
<SoftwareIcon id={s.id} key={i}/>
</a>)}
</div>
<Description {...props} url={props.descriptionSourceUrl}/>
<ul className="list-group list-group-flush">