mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-06-20 05:21:00 +02:00
Convert NoSeries to TypeScript
This commit is contained in:
committed by
Mark McDowall
parent
0b9a212f33
commit
e1e10e195c
@@ -1,11 +1,14 @@
|
|||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Button from 'Components/Link/Button';
|
import Button from 'Components/Link/Button';
|
||||||
import { kinds } from 'Helpers/Props';
|
import { kinds } from 'Helpers/Props';
|
||||||
import translate from 'Utilities/String/translate';
|
import translate from 'Utilities/String/translate';
|
||||||
import styles from './NoSeries.css';
|
import styles from './NoSeries.css';
|
||||||
|
|
||||||
function NoSeries(props) {
|
interface NoSeriesProps {
|
||||||
|
totalItems: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
function NoSeries(props: NoSeriesProps) {
|
||||||
const { totalItems } = props;
|
const { totalItems } = props;
|
||||||
|
|
||||||
if (totalItems > 0) {
|
if (totalItems > 0) {
|
||||||
@@ -25,19 +28,13 @@ function NoSeries(props) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.buttonContainer}>
|
<div className={styles.buttonContainer}>
|
||||||
<Button
|
<Button to="/add/import" kind={kinds.PRIMARY}>
|
||||||
to="/add/import"
|
|
||||||
kind={kinds.PRIMARY}
|
|
||||||
>
|
|
||||||
{translate('ImportExistingSeries')}
|
{translate('ImportExistingSeries')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.buttonContainer}>
|
<div className={styles.buttonContainer}>
|
||||||
<Button
|
<Button to="/add/new" kind={kinds.PRIMARY}>
|
||||||
to="/add/new"
|
|
||||||
kind={kinds.PRIMARY}
|
|
||||||
>
|
|
||||||
{translate('AddNewSeries')}
|
{translate('AddNewSeries')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,8 +42,4 @@ function NoSeries(props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
NoSeries.propTypes = {
|
|
||||||
totalItems: PropTypes.number.isRequired
|
|
||||||
};
|
|
||||||
|
|
||||||
export default NoSeries;
|
export default NoSeries;
|
||||||
Reference in New Issue
Block a user