vn-verdnaturachat/app/views/RoomsListView/ListHeader/index.js

27 lines
537 B
JavaScript
Raw Normal View History

2019-04-17 18:57:46 +00:00
import React from 'react';
import PropTypes from 'prop-types';
import Directory from './Directory';
2019-04-17 18:57:46 +00:00
import Sort from './Sort';
const ListHeader = React.memo(({
2020-02-13 19:24:39 +00:00
searching,
sortBy,
toggleSort,
goDirectory
2019-04-17 18:57:46 +00:00
}) => (
<>
2020-02-13 19:24:39 +00:00
<Directory searching={searching} goDirectory={goDirectory} />
<Sort searching={searching} sortBy={sortBy} toggleSort={toggleSort} />
</>
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,
goDirectory: PropTypes.func
2019-04-17 18:57:46 +00:00
};
export default ListHeader;