import React from 'react'
import styles from './index.module.less'
import { useStore } from '../../store'

const ResultCount: React.FC = () => {
  const [store, useObserver] = useStore()

  return useObserver(() => {
    const { total } = store.searchPagination.pagination

    return <div className={styles['result-count']}>共{total}项搜索结果</div>
  })
}

export default ResultCount
