You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			24 lines
		
	
	
		
			698 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			24 lines
		
	
	
		
			698 B
		
	
	
	
		
			TypeScript
		
	
import { connect } from 'react-redux';
 | 
						|
import { mapDispatchToProps } from '../actions';
 | 
						|
 | 
						|
import { MainHeader } from '../../components/MainHeader';
 | 
						|
import { StateType } from '../reducer';
 | 
						|
 | 
						|
import { getQuery } from '../selectors/search';
 | 
						|
import { getIntl, getRegionCode, getUserNumber } from '../selectors/user';
 | 
						|
import { getMe } from '../selectors/conversations';
 | 
						|
 | 
						|
const mapStateToProps = (state: StateType) => {
 | 
						|
  return {
 | 
						|
    searchTerm: getQuery(state),
 | 
						|
    regionCode: getRegionCode(state),
 | 
						|
    ourNumber: getUserNumber(state),
 | 
						|
    ...getMe(state),
 | 
						|
    i18n: getIntl(state),
 | 
						|
  };
 | 
						|
};
 | 
						|
 | 
						|
const smart = connect(mapStateToProps, mapDispatchToProps);
 | 
						|
 | 
						|
export const SmartMainHeader = smart(MainHeader);
 |