openreplay/frontend/app/components/BugFinder/SessionList/SessionListFooter.js
Shekar Siri 2ed5cac986
Webpack upgrade and dependency cleanup (#523)
* change(ui) - webpack update
* change(ui) - api optimize and other fixes
2022-06-03 16:47:38 +02:00

29 lines
773 B
JavaScript

import { connect } from 'react-redux';
import { Button } from 'UI';
import styles from './sessionListFooter.module.css';
const SessionListFooter = ({
displayedCount, totalCount, loading, onLoadMoreClick,
}) => (
<div className={ styles.pageLoading }>
<div className={ styles.countInfo }>
{ `Displaying ${ displayedCount } of ${ totalCount }` }
</div>
{ totalCount > displayedCount &&
<Button
onClick={ onLoadMoreClick }
disabled={ loading }
loading={ loading }
outline
>
{ 'Load more...' }
</Button>
}
</div>
);
SessionListFooter.displayName = 'SessionListFooter';
export default connect(state => ({
loading: state.getIn([ 'sessions', 'loading' ])
}))(SessionListFooter);