--- // 月別・年度別アーカイブのリンク一覧。行事予定ページの下部に置く。 // アーカイブは前々月以前の月だけ(前月以降はメインページに掲載している)。 import { archiveFiscalYearKeys, archiveMonthKeys, fiscalYearLabel, fiscalYearOf, monthCounts, monthLabel, } from '@/lib/schedule-months'; import { scheduleUrl } from '@/data/schedule/config'; const groups = [...new Set(archiveMonthKeys.map((month) => fiscalYearOf(month)))].map((fy) => ({ key: fy, label: fiscalYearLabel(fy), hasPage: archiveFiscalYearKeys.includes(fy), months: archiveMonthKeys.filter((month) => fiscalYearOf(month) === fy), })); --- { groups.length === 0 ? (

前々月より前に終了した予定はまだありません。月が進むと、ここに過去の予定が表示されます。

) : (
{groups.map((group) => (

{group.hasPage ? ( {group.label}の予定 ) : ( group.label )}

))}
) }