From e1e10e195c09ea78179d92ae11c385403096d966 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 2 Sep 2024 16:04:56 -0700 Subject: [PATCH] Convert NoSeries to TypeScript --- .../src/Series/{NoSeries.js => NoSeries.tsx} | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) rename frontend/src/Series/{NoSeries.js => NoSeries.tsx} (73%) diff --git a/frontend/src/Series/NoSeries.js b/frontend/src/Series/NoSeries.tsx similarity index 73% rename from frontend/src/Series/NoSeries.js rename to frontend/src/Series/NoSeries.tsx index da526c644..54053ad9e 100644 --- a/frontend/src/Series/NoSeries.js +++ b/frontend/src/Series/NoSeries.tsx @@ -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 './NoSeries.css'; -function NoSeries(props) { +interface NoSeriesProps { + totalItems: number; +} + +function NoSeries(props: NoSeriesProps) { const { totalItems } = props; if (totalItems > 0) { @@ -25,19 +28,13 @@ function NoSeries(props) {
-
-
@@ -45,8 +42,4 @@ function NoSeries(props) { ); } -NoSeries.propTypes = { - totalItems: PropTypes.number.isRequired -}; - export default NoSeries;