// Copyright (C) 2017-2024 Smart code 203358507 import React, { useMemo, useState } from 'react'; import { useProfile, withCoreSuspender } from 'stremio/common'; import { MainNavBars, BottomSheet } from 'stremio/components'; import Selector from './Selector'; import Table from './Table'; import List from './List'; import Details from './Details'; import Placeholder from './Placeholder'; import useCalendar from './useCalendar'; import useCalendarDate from './useCalendarDate'; import styles from './Calendar.less'; import classNames from 'classnames'; type Props = { urlParams: UrlParams, }; const Calendar = ({ urlParams }: Props) => { const calendar = useCalendar(urlParams); const profile = useProfile(); const { toDayMonth } = useCalendarDate(profile); const [selected, setSelected] = useState(null); const detailsTitle = useMemo(() => toDayMonth(selected), [selected, toDayMonth]); const onDetailsClose = () => { setSelected(null); }; return ( { profile.auth !== null ?
: } ); }; const CalendarFallback = () => ( ); export default withCoreSuspender(Calendar, CalendarFallback);