27 lines
537 B
JavaScript
27 lines
537 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import Directory from './Directory';
|
|
import Sort from './Sort';
|
|
|
|
const ListHeader = React.memo(({
|
|
searching,
|
|
sortBy,
|
|
toggleSort,
|
|
goDirectory
|
|
}) => (
|
|
<>
|
|
<Directory searching={searching} goDirectory={goDirectory} />
|
|
<Sort searching={searching} sortBy={sortBy} toggleSort={toggleSort} />
|
|
</>
|
|
));
|
|
|
|
ListHeader.propTypes = {
|
|
searching: PropTypes.bool,
|
|
sortBy: PropTypes.string,
|
|
toggleSort: PropTypes.func,
|
|
goDirectory: PropTypes.func
|
|
};
|
|
|
|
export default ListHeader;
|