diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-05-07 16:01:47 -0400 |
|---|---|---|
| committer | Ivan Chen <ivan@tagg.id> | 2021-05-07 16:01:47 -0400 |
| commit | 76bc8c5825f39257be6e7648d12b858f1e805569 (patch) | |
| tree | b94d9570439ebfa42e6664144f124abe5d4113e3 /src/screens/main | |
| parent | 65c7411f4609edac3d4d5f23fc031ed274fc5872 (diff) | |
| parent | c9d32e68fbb9d1bc175722bfda49454a6f627eae (diff) | |
Merge branch 'master' into tma821-load-badges-faster-ft
# Conflicts:
# src/utils/users.ts
Diffstat (limited to 'src/screens/main')
| -rw-r--r-- | src/screens/main/NotificationsScreen.tsx | 4 | ||||
| -rw-r--r-- | src/screens/main/notification/EmptyNotificationView.tsx | 48 |
2 files changed, 2 insertions, 50 deletions
diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index 3efd9af8..9fbc4cfe 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -28,7 +28,7 @@ import { import {RootState} from '../../store/rootReducer'; import {NotificationType, ScreenType} from '../../types'; import {getDateAge, normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; -import EmptyNotificationView from './notification/EmptyNotificationView'; +import EmptyContentView from '../../components/common/EmptyContentView'; const NotificationsScreen: React.FC = () => { const {newNotificationReceived} = useSelector( @@ -304,7 +304,7 @@ const NotificationsScreen: React.FC = () => { extraData={requestLimit} ListEmptyComponent={ <View style={styles.emptyViewContainer}> - <EmptyNotificationView /> + <EmptyContentView viewType={'Notification'} /> </View> } /> diff --git a/src/screens/main/notification/EmptyNotificationView.tsx b/src/screens/main/notification/EmptyNotificationView.tsx deleted file mode 100644 index f43cfb2a..00000000 --- a/src/screens/main/notification/EmptyNotificationView.tsx +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; -import {Image, Text, StyleSheet, View} from 'react-native'; -import LinearGradient from 'react-native-linear-gradient'; -import {UP_TO_DATE, NO_NEW_NOTIFICATIONS} from '../../../constants/strings'; -import {NOTIFICATION_GRADIENT} from '../../../constants/constants'; -import {SCREEN_HEIGHT, normalize} from '../../../utils'; -const EmptyNotificationView: React.FC = () => { - return ( - <View style={styles.container}> - <LinearGradient - style={styles.backgroundLinearView} - useAngle={true} - angle={180} - colors={NOTIFICATION_GRADIENT}> - <Image - source={require('../../../assets/images/empty_notifications.png')} - /> - </LinearGradient> - <View style={styles.topMargin}> - <Text style={styles.upperTextStyle}>{UP_TO_DATE}</Text> - </View> - <View> - <Text style={styles.bottomTextStyle}>{NO_NEW_NOTIFICATIONS}</Text> - </View> - </View> - ); -}; - -const styles = StyleSheet.create({ - container: {alignItems: 'center'}, - topMargin: {marginTop: SCREEN_HEIGHT * 0.025}, - upperTextStyle: { - fontWeight: '700', - fontSize: normalize(23), - lineHeight: normalize(40), - }, - bottomTextStyle: { - color: '#2D3B45', - fontWeight: '600', - fontSize: normalize(20), - lineHeight: normalize(40), - }, - backgroundLinearView: { - borderRadius: 135.5, - }, -}); - -export default EmptyNotificationView; |
