You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
861 B
33 lines
861 B
import React, { useCallback } from 'react';
|
|
import Link from 'Components/Link/Link';
|
|
import translate from 'Utilities/String/translate';
|
|
import styles from './SelectDownloadClientRow.css';
|
|
|
|
interface SelectSeasonRowProps {
|
|
id: number;
|
|
name: string;
|
|
priority: number;
|
|
onDownloadClientSelect(downloadClientId: number): unknown;
|
|
}
|
|
|
|
function SelectDownloadClientRow(props: SelectSeasonRowProps) {
|
|
const { id, name, priority, onDownloadClientSelect } = props;
|
|
|
|
const onSeasonSelectWrapper = useCallback(() => {
|
|
onDownloadClientSelect(id);
|
|
}, [id, onDownloadClientSelect]);
|
|
|
|
return (
|
|
<Link
|
|
className={styles.downloadClient}
|
|
component="div"
|
|
onPress={onSeasonSelectWrapper}
|
|
>
|
|
<div>{name}</div>
|
|
<div>{translate('PrioritySettings', { priority })}</div>
|
|
</Link>
|
|
);
|
|
}
|
|
|
|
export default SelectDownloadClientRow;
|