misc linting

This commit is contained in:
Collin M. Barrett 2019-09-01 17:14:06 -05:00
parent 23a7f0f141
commit c8dc9a125a
4 changed files with 14 additions and 5 deletions

View file

@ -27,7 +27,7 @@ export const ListDrawer = (props: Props) => {
software={list.syntaxId ? props.software.filter((s: Software) => s.syntaxIds.includes(list.syntaxId)) : []}
tags={list.tagIds && props.tags.filter((t: Tag) => list.tagIds.includes(t.id))}
{...rp} />
: props.lists && props.lists.length && <Redirect to={{ pathname: "/", }} />;
: (props.lists && props.lists.length && <Redirect to={{ pathname: "/", }} />) || null;
};
return <Route path="/lists/:listSlug" render={renderDrawer} />;
};

View file

@ -0,0 +1,4 @@
/* allow for 2nd row's bottom border to not be chopped in AllListsTable */
.grow {
max-height: none !important;
}

View file

@ -1,6 +1,7 @@
import React from 'react';
import { Software } from '../../interfaces/Software';
import styles from './SoftwareCloud.module.css';
import { SoftwareIcon } from './SoftwareIcon';
interface Props {
@ -10,11 +11,14 @@ interface Props {
export const SoftwareCloud = (props: Props) =>
props.software && props.software.length
? <div>
? <div className={styles.grow}>
{props.showLabel && <h3>{`Software:`}</h3>}
{props.software.map((s: Software, i: number) =>
s.homeUrl
? <a key={i} href={s.homeUrl} target="_blank" rel="noopener noreferrer">
? <a
key={i}
href={s.homeUrl}
target="_blank" rel="noopener noreferrer">
<SoftwareIcon id={s.id} />
</a>
: <SoftwareIcon key={i} id={s.id} />)}

View file

@ -42,7 +42,8 @@ interface Props {
export const SoftwareIcon = (props: Props) =>
icons[props.id]
? <img src={icons[props.id].image}
? <img
src={icons[props.id].image}
height="20"
alt={icons[props.id].imageTitle}
title={icons[props.id].imageTitle} />
@ -86,5 +87,5 @@ const icons: { [id: number]: Icon; } = {
31: { image: img31, imageTitle: "AdGuard Home" },
32: { image: img32, imageTitle: "AdNauseam" },
33: { image: img33, imageTitle: "Legacy Unix derivatives" },
34: { image: img34, imageTitle: "Windows command line" },
34: { image: img34, imageTitle: "Windows command line" }
};