mattermost-mobile/app/screens/notification/notification_title.tsx
Elias Nahum 016a725732
MM-28105 do not crash when in-app notification shows (#4915)
* MM-28105 do not crash when in-app notification shows

* Use index.tsx to register the notification screen

* Fix notification e2e and some import cleanup

* Update iOS notification json

* e2e: Show the add reaction screen before receiving a notification

* Update snapshots

* Patch react-native-notifications to prevent iOS crash when opening

* Apply TM4J id

Co-authored-by: Joseph Baylon <joseph.baylon@mattermost.com>
2020-10-22 14:34:49 -03:00

32 lines
No EOL
723 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {StyleSheet, Text} from 'react-native';
interface NotificationTitleProps {
channelName: string;
}
const NotificationTitle = ({channelName}: NotificationTitleProps) => {
return (
<Text
numberOfLines={1}
ellipsizeMode='tail'
style={styles.title}
testID='in_app_notification.title'
>
{channelName}
</Text>
);
};
const styles = StyleSheet.create({
title: {
color: '#FFFFFF',
fontSize: 14,
fontWeight: '600',
},
});
export default NotificationTitle;