Skip to content

Commit 758aa32

Browse files
committed
feat(Schedule): 開始日時でソート
1 parent e9f38b4 commit 758aa32

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

2025/src/components/Schedule/index.astro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ const timetable = await getCollection("timetable");
99
<section id="schedule" class="bg-white py-10 md:py-16">
1010
<div class="container mx-auto max-w-4xl px-4">
1111
<Heading>スケジュール</Heading>
12-
{timetable.shift()?.data.map((schedule) => <TimeTable {...schedule} />)}
12+
{
13+
timetable
14+
.shift()
15+
?.data.sort((a, b) => a.start_at.getTime() - b.start_at.getTime())
16+
.map((schedule) => <TimeTable {...schedule} />)
17+
}
1318
</div>
1419
</section>

0 commit comments

Comments
 (0)