mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-24 06:27:08 -04:00
Convert NoMovie to TypeScript
(cherry picked from commit e1e10e195c09ea78179d92ae11c385403096d966) Closes #10401
This commit is contained in:
parent
12c814ed78
commit
51cd7c70ba
1 changed files with 8 additions and 17 deletions
|
@ -1,11 +1,14 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import Button from 'Components/Link/Button';
|
||||
import { kinds } from 'Helpers/Props';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './NoMovie.css';
|
||||
|
||||
function NoMovie(props) {
|
||||
interface NoMovieProps {
|
||||
totalItems: number;
|
||||
}
|
||||
|
||||
function NoMovie(props: NoMovieProps) {
|
||||
const { totalItems } = props;
|
||||
|
||||
if (totalItems > 0) {
|
||||
|
@ -20,24 +23,16 @@ function NoMovie(props) {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.message}>
|
||||
{translate('NoMoviesExist')}
|
||||
</div>
|
||||
<div className={styles.message}>{translate('NoMoviesExist')}</div>
|
||||
|
||||
<div className={styles.buttonContainer}>
|
||||
<Button
|
||||
to="/add/import"
|
||||
kind={kinds.PRIMARY}
|
||||
>
|
||||
<Button to="/add/import" kind={kinds.PRIMARY}>
|
||||
{translate('ImportExistingMovies')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<div className={styles.buttonContainer}>
|
||||
<Button
|
||||
to="/add/new"
|
||||
kind={kinds.PRIMARY}
|
||||
>
|
||||
<Button to="/add/new" kind={kinds.PRIMARY}>
|
||||
{translate('AddNewMovie')}
|
||||
</Button>
|
||||
</div>
|
||||
|
@ -45,8 +40,4 @@ function NoMovie(props) {
|
|||
);
|
||||
}
|
||||
|
||||
NoMovie.propTypes = {
|
||||
totalItems: PropTypes.number.isRequired
|
||||
};
|
||||
|
||||
export default NoMovie;
|
Loading…
Add table
Add a link
Reference in a new issue