// Copyright (C) 2017-2024 Smart code 203358507 import React, { useMemo } from 'react'; import Icon from '@stremio/stremio-icons/react'; import classNames from 'classnames'; import { Button, Image, HorizontalScroll } from 'stremio/common'; import styles from './Cell.less'; type Props = { selected: CalendarDate | null, monthInfo: CalendarMonthInfo, date: CalendarDate, items: CalendarContentItem[], onClick: (date: CalendarDate) => void, }; const Cell = ({ selected, monthInfo, date, items, onClick }: Props) => { const [active, today] = useMemo(() => [ date.day === selected?.day, date.day === monthInfo.today, ], [selected, monthInfo, date]); const onCellClick = () => { onClick && onClick(date); }; return ( )) } { items.length > 0 ? : null } ); }; export default Cell;