+
+
{
- return a.startDate.getTime() - b.startDate.getTime();
-});
+import { ScheduleType } from "@/types/schedule";
+import { fetchData, EndpointsType } from "@/features/db";
interface GroupType {
id: number;
@@ -17,52 +13,152 @@ interface GroupType {
rightTitle: string;
}
-const schedule_group: GroupType[] = sorted_schdule.map((items, i) => {
- return {
- id: i,
- title: items.place,
- rightTitle: items.title,
- };
-});
-
interface TimelineDataType {
id: number;
group: number;
title: string;
- start_time: number; //start_timeとend_timeはプロパティ名固定
+ start_time: number;
end_time: number;
+ itemProps?: { [key: string]: string };
}
-const timeline_data: TimelineDataType[] = sorted_schdule.map((item, i) => {
- //時間修正
- const fixed_start_date = new Date(
- item.startDate.setMonth(item.startDate.getMonth() - 1),
+export const Schedule = () => {
+ const [schedules, setSchedule] = useStateMAP
+
+