mattermost-mobile/app/screens/in_app_notification/server.tsx
Elias Nahum 790b1beb22
[Gekidou] push notifications (#5779)
* Push notifications entry point

* Process android notification natively only if RN is not initialized

* Database changes to store local channel viewed_at

* EphemeralStore wait until screen removed

* Move schedule session notification to utility

* Fix channel remote & local actions + added actions for markChannelAsViewed & fetchMyChannel

* Add fetchMyTeam remote action

* Add dismissAllModalsAndPopToScreen to navigation

* Improve post list component & add app state to re-trigger queries

* Improve WS implementation

* Handle push notification events

* Fix postsInChannel since handler

* Handle in-app notifications

* Post list to listen to column changes

* Track selected bottom tab in ephemeral store

* add useIsTablet hook

* in-app notifications on tablets
2021-10-27 17:53:11 -03:00

38 lines
896 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {StyleSheet, Text, View} from 'react-native';
interface NotificationServerProps {
serverName: string;
}
const styles = StyleSheet.create({
container: {
alignItems: 'flex-start',
marginTop: 5,
},
text: {
color: 'rgba(255, 255, 255, 0.64)',
fontFamily: 'OpenSans',
fontSize: 10,
},
});
const Server = ({serverName}: NotificationServerProps) => {
return (
<View style={styles.container}>
<Text
numberOfLines={1}
ellipsizeMode='tail'
style={styles.text}
testID='in_app_notification.title'
>
{serverName}
</Text>
</View>
);
};
export default Server;