diff --git a/src/pages/LoadingPage.js b/src/pages/LoadingPage.tsx similarity index 65% rename from src/pages/LoadingPage.js rename to src/pages/LoadingPage.tsx index fc315495619a..9708aa28eb5e 100644 --- a/src/pages/LoadingPage.js +++ b/src/pages/LoadingPage.tsx @@ -1,28 +1,24 @@ -import PropTypes from 'prop-types'; import React from 'react'; import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; import useThemeStyles from '@hooks/useThemeStyles'; -const propTypes = { +type LoadingPageProps = { /** Method to trigger when pressing back button of the header */ - onBackButtonPress: PropTypes.func, - title: PropTypes.string.isRequired, -}; + onBackButtonPress?: () => void; -const defaultProps = { - onBackButtonPress: undefined, + title: string; }; -function LoadingPage(props) { +function LoadingPage({onBackButtonPress, title}: LoadingPageProps) { const styles = useThemeStyles(); return ( @@ -30,7 +26,5 @@ function LoadingPage(props) { } LoadingPage.displayName = 'LoadingPage'; -LoadingPage.propTypes = propTypes; -LoadingPage.defaultProps = defaultProps; export default LoadingPage; diff --git a/src/pages/workspace/SearchInputManager.js b/src/pages/workspace/SearchInputManager.ts similarity index 100% rename from src/pages/workspace/SearchInputManager.js rename to src/pages/workspace/SearchInputManager.ts