import PropTypes from 'prop-types'; import React from 'react'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; import RootFolderRowConnector from './RootFolderRowConnector'; const rootFolderColumns = [ { name: 'path', label: 'Path', isVisible: true }, { name: 'freeSpace', label: 'Free Space', isVisible: true }, { name: 'unmappedFolders', label: 'Unmapped Folders', isVisible: true }, { name: 'actions', isVisible: true } ]; function RootFolders(props) { const { isFetching, isPopulated, error, items } = props; if (isFetching && !isPopulated) { return ( ); } if (!isFetching && !!error) { return (
Unable to load root folders
); } return ( { items.map((rootFolder) => { return ( ); }) }
); } RootFolders.propTypes = { isFetching: PropTypes.bool.isRequired, isPopulated: PropTypes.bool.isRequired, error: PropTypes.object, items: PropTypes.arrayOf(PropTypes.object).isRequired }; export default RootFolders;