import React, { useEffect } from 'react'
import { useSelector } from 'react-redux'
import HolidayItem from './HolidayItem'

const Holidays = () => {
  const holidayList = useSelector(state => state.holidaySettings.holidays)
  console.log(holidayList)
  return (
    <div className="dreamfox-holidays__row">
      <div className="dreamfox-title">Holidays</div>
      <table>
        <tbody>
          {holidayList && holidayList.map(item =><HolidayItem key={item.id} item={item} />)}
        </tbody>
      </table>
    </div>
  )
}

export default Holidays
