import { Button, DatePicker, DatePickerProps, Select, Space } from 'antd';
import React, { Suspense, useState } from 'react';
import Team from '../../components/schedule-old/team/Team';
import { SettingOutlined } from '@ant-design/icons';
import { useDispatch } from 'react-redux';
import { toggleSettingsDrawer } from '@/features/schedule-old/scheduleSlice';
import ScheduleSettingsDrawer from '@/features/schedule-old/ScheduleSettingsDrawer';
import dayjs from 'dayjs';
import { useTranslation } from 'react-i18next';
import { useDocumentTitle } from '@/hooks/useDoumentTItle';
import { SuspenseFallback } from '@/components/suspense-fallback/suspense-fallback';
const { Option } = Select;
type PickerType = 'week' | 'month';
const PickerWithType = ({
type,
onChange,
}: {
type: PickerType;
onChange: DatePickerProps['onChange'];
}) => {
return ;
};
const Schedule: React.FC = () => {
const [type, setType] = useState('week');
const [date, setDate] = useState(null);
const { t } = useTranslation('schedule');
const dispatch = useDispatch();
useDocumentTitle('Schedule');
const handleDateChange = (value: dayjs.Dayjs | null) => {
if (!value) return;
let selectedDate = value.toDate();
// If 'Month' is selected, default to the first day of the selected month
if (type === 'month') {
selectedDate = new Date(selectedDate.getFullYear(), selectedDate.getMonth(), 1);
}
setDate(selectedDate);
};
const handleToday = () => {
const today = new Date();
setDate(today);
};
return (
}>
);
};
export default Schedule;