diff --git a/app/containers/BackgroundContainer/index.stories.js b/app/containers/BackgroundContainer/index.stories.tsx similarity index 95% rename from app/containers/BackgroundContainer/index.stories.js rename to app/containers/BackgroundContainer/index.stories.tsx index 0b6c9a1c6..95546ae27 100644 --- a/app/containers/BackgroundContainer/index.stories.js +++ b/app/containers/BackgroundContainer/index.stories.tsx @@ -24,7 +24,7 @@ stories.add('long text', () => ( )); -const ThemeStory = ({ theme, ...props }) => ( +const ThemeStory = ({ theme, ...props }: any) => ( diff --git a/app/containers/BackgroundContainer/index.js b/app/containers/BackgroundContainer/index.tsx similarity index 61% rename from app/containers/BackgroundContainer/index.js rename to app/containers/BackgroundContainer/index.tsx index ed4716b74..b6580de21 100644 --- a/app/containers/BackgroundContainer/index.js +++ b/app/containers/BackgroundContainer/index.tsx @@ -1,13 +1,16 @@ import React from 'react'; -import { - ImageBackground, StyleSheet, Text, View, ActivityIndicator -} from 'react-native'; -import PropTypes from 'prop-types'; +import { ImageBackground, StyleSheet, Text, View, ActivityIndicator } from 'react-native'; import { withTheme } from '../../theme'; import sharedStyles from '../../views/Styles'; import { themes } from '../../constants/colors'; +interface IBackgroundContainer { + text: string; + theme: string; + loading: boolean; +} + const styles = StyleSheet.create({ container: { flex: 1 @@ -29,17 +32,14 @@ const styles = StyleSheet.create({ } }); -const BackgroundContainer = ({ theme, text, loading }) => ( +const BackgroundContainer = ({ theme, text, loading }: IBackgroundContainer) => ( {text ? {text} : null} - {loading ? : null} + {/*{loading ? : null}*/} + {loading ? : null} + ); -BackgroundContainer.propTypes = { - text: PropTypes.string, - theme: PropTypes.string, - loading: PropTypes.bool -}; export default withTheme(BackgroundContainer);