parent
7149968ea9
commit
df8df48abd
@ -1,55 +0,0 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import Label from 'Components/Label';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||||
import styles from './SelectSeriesRow.css';
|
||||
|
||||
class SelectSeriesRow extends Component {
|
||||
|
||||
//
|
||||
// Listeners
|
||||
|
||||
onPress = () => {
|
||||
this.props.onSeriesSelect(this.props.id);
|
||||
};
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<VirtualTableRowCell className={styles.title}>
|
||||
{this.props.title}
|
||||
</VirtualTableRowCell>
|
||||
|
||||
<VirtualTableRowCell className={styles.year}>
|
||||
{this.props.year}
|
||||
</VirtualTableRowCell>
|
||||
|
||||
<VirtualTableRowCell className={styles.tvdbId}>
|
||||
<Label>{this.props.tvdbId}</Label>
|
||||
</VirtualTableRowCell>
|
||||
|
||||
<VirtualTableRowCell className={styles.imdbId}>
|
||||
{
|
||||
this.props.imdbId ?
|
||||
<Label>{this.props.imdbId}</Label> :
|
||||
null
|
||||
}
|
||||
</VirtualTableRowCell>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
SelectSeriesRow.propTypes = {
|
||||
id: PropTypes.number.isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
tvdbId: PropTypes.number.isRequired,
|
||||
imdbId: PropTypes.string,
|
||||
year: PropTypes.number.isRequired,
|
||||
onSeriesSelect: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default SelectSeriesRow;
|
@ -0,0 +1,38 @@
|
||||
import React from 'react';
|
||||
import Label from 'Components/Label';
|
||||
import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell';
|
||||
import styles from './SelectSeriesRow.css';
|
||||
|
||||
interface SelectSeriesRowProps {
|
||||
title: string;
|
||||
tvdbId: number;
|
||||
imdbId?: string;
|
||||
year: number;
|
||||
}
|
||||
|
||||
function SelectSeriesRow({
|
||||
title,
|
||||
year,
|
||||
tvdbId,
|
||||
imdbId,
|
||||
}: SelectSeriesRowProps) {
|
||||
return (
|
||||
<>
|
||||
<VirtualTableRowCell className={styles.title}>
|
||||
{title}
|
||||
</VirtualTableRowCell>
|
||||
|
||||
<VirtualTableRowCell className={styles.year}>{year}</VirtualTableRowCell>
|
||||
|
||||
<VirtualTableRowCell className={styles.tvdbId}>
|
||||
<Label>{tvdbId}</Label>
|
||||
</VirtualTableRowCell>
|
||||
|
||||
<VirtualTableRowCell className={styles.imdbId}>
|
||||
{imdbId ? <Label>{imdbId}</Label> : null}
|
||||
</VirtualTableRowCell>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default SelectSeriesRow;
|
Loading…
Reference in new issue