* MM-30164 fix safe area insets * Fix unit test setup mock for react-native-device-info * Add insets for edit profile screen * Fix about screen * Fix theme screen * Lock phone screen to portrait * fix unit tests * Fix autocomplete layout
32 lines
1 KiB
JavaScript
32 lines
1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {bindActionCreators} from 'redux';
|
|
import {connect} from 'react-redux';
|
|
|
|
import {getTheme, get as getPreference} from '@mm-redux/selectors/entities/preferences';
|
|
import {getCurrentUserId} from '@mm-redux/selectors/entities/users';
|
|
import {savePreferences} from '@mm-redux/actions/preferences';
|
|
import Preferences from '@mm-redux/constants/preferences';
|
|
import ClockDisplay from './clock_display';
|
|
|
|
function mapStateToProps(state) {
|
|
const militaryTime = getPreference(state, Preferences.CATEGORY_DISPLAY_SETTINGS, 'use_military_time') || 'false';
|
|
const currentUserId = getCurrentUserId(state);
|
|
|
|
return {
|
|
userId: currentUserId,
|
|
theme: getTheme(state),
|
|
militaryTime,
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
actions: bindActionCreators({
|
|
savePreferences,
|
|
}, dispatch),
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ClockDisplay);
|