diff --git a/src/components/basicUIElements/view/emptyScreen/emptyScreenStyles.js b/src/components/basicUIElements/view/emptyScreen/emptyScreenStyles.ts similarity index 100% rename from src/components/basicUIElements/view/emptyScreen/emptyScreenStyles.js rename to src/components/basicUIElements/view/emptyScreen/emptyScreenStyles.ts diff --git a/src/components/basicUIElements/view/emptyScreen/emptyScreenView.js b/src/components/basicUIElements/view/emptyScreen/emptyScreenView.tsx similarity index 68% rename from src/components/basicUIElements/view/emptyScreen/emptyScreenView.js rename to src/components/basicUIElements/view/emptyScreen/emptyScreenView.tsx index b17313352..90bb4b4e9 100644 --- a/src/components/basicUIElements/view/emptyScreen/emptyScreenView.js +++ b/src/components/basicUIElements/view/emptyScreen/emptyScreenView.tsx @@ -1,18 +1,24 @@ import React from 'react'; -import { View, Text } from 'react-native'; +import { View, Text, TextStyle, ViewStyle } from 'react-native'; import LottieView from 'lottie-react-native'; import { useIntl } from 'react-intl'; import styles from './emptyScreenStyles'; import globalStyles from '../../../../globalStyles'; -const EmptyScreenView = ({ style, textStyle, text }) => { +interface Props { + style?:ViewStyle; + textStyle?:TextStyle; + text?:string; +} + +const EmptyScreenView = ({ style, textStyle, text } : Props) => { const intl = useIntl(); return ( - + { - if (isLoading) { + if (isLoading && !isRefreshing) { return ( diff --git a/src/components/tabbedPosts/view/listEmptyView.tsx b/src/components/tabbedPosts/view/listEmptyView.tsx index 1c3023fb7..9296f7401 100644 --- a/src/components/tabbedPosts/view/listEmptyView.tsx +++ b/src/components/tabbedPosts/view/listEmptyView.tsx @@ -4,7 +4,7 @@ import { get } from 'lodash'; import { Text, View, FlatList } from 'react-native'; import { NoPost, PostCardPlaceHolder, UserListItem } from '../..'; import globalStyles from '../../../globalStyles'; -import { CommunityListItem } from '../../basicUIElements'; +import { CommunityListItem, EmptyScreen } from '../../basicUIElements'; import styles from './tabbedPostsStyles'; import { default as ROUTES } from '../../../constants/routeNames'; import { withNavigation } from 'react-navigation'; @@ -22,7 +22,7 @@ interface TabEmptyViewProps { const TabEmptyView = ({ filterKey, isNoPost, - navigation + navigation, }: TabEmptyViewProps) => { const intl = useIntl(); @@ -326,7 +326,9 @@ const TabEmptyView = ({ ); } else { - return {intl.formatMessage({ id: 'profile.havent_posted' })}; + return ( + + ) } } diff --git a/src/components/tabbedPosts/view/tabbedPostsStyles.tsx b/src/components/tabbedPosts/view/tabbedPostsStyles.tsx index 90898a82f..b50674a28 100644 --- a/src/components/tabbedPosts/view/tabbedPostsStyles.tsx +++ b/src/components/tabbedPosts/view/tabbedPostsStyles.tsx @@ -78,4 +78,7 @@ export default EStyleSheet.create({ marginLeft: -8, borderColor: '$primaryBlue', }, + emptyAnimationContainer:{ + marginTop:56 + } });