application-amicale/screens/HomeScreen.js

33 lines
1 KiB
JavaScript
Raw Normal View History

// @flow
import * as React from 'react';
2019-06-25 22:20:24 +02:00
import {Container, Content, Text, Button, Icon} from 'native-base';
import CustomHeader from '../components/CustomHeader';
import i18n from "i18n-js";
import NotificationsManager from '../utils/NotificationsManager'
2019-06-25 22:20:24 +02:00
type Props = {
navigation: Object,
}
2019-06-25 22:20:24 +02:00
export default class HomeScreen extends React.Component<Props> {
2019-06-25 22:20:24 +02:00
render() {
const nav = this.props.navigation;
return (
<Container>
<CustomHeader navigation={nav} title={i18n.t('screens.home')}/>
2019-06-27 10:17:51 +02:00
<Content padder>
<Button onPress={() => NotificationsManager.sendNotificationImmediately('coucou', 'whoa')}>
2019-06-25 22:20:24 +02:00
<Icon
active
name={'bell-ring'}
type={'MaterialCommunityIcons'}
/>
<Text>Instant Notification</Text>
2019-06-25 22:20:24 +02:00
</Button>
</Content>
</Container>
);
}
}