2019-06-29 13:37:21 +02:00
|
|
|
// @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";
|
2019-06-27 19:33:22 +02:00
|
|
|
import NotificationsManager from '../utils/NotificationsManager'
|
2019-06-25 22:20:24 +02:00
|
|
|
|
2019-06-29 13:37:21 +02:00
|
|
|
type Props = {
|
|
|
|
navigation: Object,
|
|
|
|
}
|
2019-06-25 22:20:24 +02:00
|
|
|
|
2019-06-29 15:43:57 +02:00
|
|
|
/**
|
|
|
|
* Class defining the app's home screen
|
|
|
|
*/
|
2019-06-29 13:37:21 +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>
|
2019-06-27 19:33:22 +02:00
|
|
|
<Button onPress={() => NotificationsManager.sendNotificationImmediately('coucou', 'whoa')}>
|
2019-06-25 22:20:24 +02:00
|
|
|
<Icon
|
|
|
|
active
|
|
|
|
name={'bell-ring'}
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
/>
|
2019-06-29 13:37:21 +02:00
|
|
|
<Text>Instant Notification</Text>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Button>
|
|
|
|
</Content>
|
|
|
|
</Container>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|