2020-08-21 13:30:11 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import I18n from '../../i18n';
|
|
|
|
import {
|
|
|
|
logEvent, events
|
|
|
|
} from '../../utils/log';
|
|
|
|
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
|
2020-08-21 13:30:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
navigateToScreen = (screen, params) => {
|
|
|
|
logEvent(events[`SE_GO_${ screen.replace('View', '').toUpperCase() }`]);
|
|
|
|
const { navigation } = this.props;
|
|
|
|
navigation.navigate(screen, params);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
2020-10-30 13:59:44 +00:00
|
|
|
<SafeAreaView testID='preferences-view'>
|
|
|
|
<StatusBar />
|
|
|
|
<List.Container>
|
|
|
|
<List.Section>
|
|
|
|
<List.Separator />
|
|
|
|
<List.Item
|
|
|
|
title={I18n.t('Notifications')}
|
|
|
|
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;
|