2020-08-21 13:30:11 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import I18n from '../../i18n';
|
2021-09-13 20:41:05 +00:00
|
|
|
import { events, logEvent } from '../../utils/log';
|
2020-08-21 13:30:11 +00:00
|
|
|
import SafeAreaView from '../../containers/SafeAreaView';
|
|
|
|
import StatusBar from '../../containers/StatusBar';
|
2020-10-30 13:59:44 +00:00
|
|
|
import * as List from '../../containers/List';
|
2020-08-21 13:30:11 +00:00
|
|
|
|
2020-08-21 18:14:06 +00:00
|
|
|
class UserPreferencesView extends React.Component {
|
2020-08-21 13:30:11 +00:00
|
|
|
static navigationOptions = () => ({
|
|
|
|
title: I18n.t('Preferences')
|
|
|
|
});
|
|
|
|
|
|
|
|
static propTypes = {
|
2020-10-30 13:59:44 +00:00
|
|
|
navigation: PropTypes.object
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2020-08-21 13:30:11 +00:00
|
|
|
|
|
|
|
navigateToScreen = (screen, params) => {
|
2021-09-13 20:41:05 +00:00
|
|
|
logEvent(events[`SE_GO_${screen.replace('View', '').toUpperCase()}`]);
|
2020-08-21 13:30:11 +00:00
|
|
|
const { navigation } = this.props;
|
|
|
|
navigation.navigate(screen, params);
|
2021-09-13 20:41:05 +00:00
|
|
|
};
|
2020-08-21 13:30:11 +00:00
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2020-10-30 13:59:44 +00:00
|
|
|
<SafeAreaView testID='preferences-view'>
|
|
|
|
<StatusBar />
|
|
|
|
<List.Container>
|
|
|
|
<List.Section>
|
|
|
|
<List.Separator />
|
|
|
|
<List.Item
|
2020-11-12 16:06:48 +00:00
|
|
|
title='Notifications'
|
2020-10-30 13:59:44 +00:00
|
|
|
onPress={() => this.navigateToScreen('UserNotificationPrefView')}
|
|
|
|
showActionIndicator
|
|
|
|
testID='preferences-view-notifications'
|
|
|
|
/>
|
|
|
|
<List.Separator />
|
|
|
|
</List.Section>
|
|
|
|
</List.Container>
|
2020-08-21 13:30:11 +00:00
|
|
|
</SafeAreaView>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-10-30 13:59:44 +00:00
|
|
|
export default UserPreferencesView;
|