Convert NoMovie to TypeScript

(cherry picked from commit e1e10e195c09ea78179d92ae11c385403096d966)

Closes #10401
pull/10406/head
Mark McDowall 2 months ago committed by Bogdan
parent 12c814ed78
commit 51cd7c70ba

@ -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…
Cancel
Save