Rocket.Chat.ReactNative/app/views/RoomsListView/ListHeader/index.js

33 lines
735 B
JavaScript
Raw Normal View History

2019-04-17 18:57:46 +00:00
import React from 'react';
import PropTypes from 'prop-types';
import Sort from './Sort';
import OmnichannelStatus from './OmnichannelStatus';
2019-04-17 18:57:46 +00:00
const ListHeader = React.memo(({
2020-02-13 19:24:39 +00:00
searching,
sortBy,
toggleSort,
goQueue,
queueSize,
inquiryEnabled,
user
2019-04-17 18:57:46 +00:00
}) => (
<>
2020-02-13 19:24:39 +00:00
<Sort searching={searching} sortBy={sortBy} toggleSort={toggleSort} />
<OmnichannelStatus searching={searching} goQueue={goQueue} inquiryEnabled={inquiryEnabled} queueSize={queueSize} user={user} />
</>
2019-04-17 18:57:46 +00:00
));
ListHeader.propTypes = {
2020-02-13 19:24:39 +00:00
searching: PropTypes.bool,
2019-04-17 18:57:46 +00:00
sortBy: PropTypes.string,
toggleSort: PropTypes.func,
goQueue: PropTypes.func,
queueSize: PropTypes.number,
inquiryEnabled: PropTypes.bool,
user: PropTypes.object
2019-04-17 18:57:46 +00:00
};
export default ListHeader;