@@ -5,7 +5,7 @@ import type { ComponentProps } from 'astro/types'
55
66export interface Item
77 extends Omit <ComponentProps <typeof WorkshopCard >, ' date' > {
8- date: Date
8+ date? : Date
99}
1010export function date(
1111 month : 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 ,
@@ -64,38 +64,30 @@ export const items: Item[] = [
6464
6565export const items2: Item [] = [
6666 {
67- date: date (4 , 17 ),
6867 title: ' Python' ,
69- place: ' C301' ,
7068 circleNames: [' Wani Hackase' ],
7169 description:
7270 ' Pythonの基礎を学びます。PythonはAIやデータ分析に使用されます。' ,
7371 },
7472 {
75- date: date (4 , 18 ),
7673 title: ' HTML, CSS' ,
77- place: ' C105' ,
7874 circleNames: [' 再履バス同好会 技術部' ],
7975 description:
8076 ' HTML, CSSの基礎を学びます。HTML, CSSはwebページの作成に使用されます。' ,
8177 },
8278 {
83- date: date (4 , 19 ),
8479 title: ' ハードウェア入門' ,
85- place: ' C104' ,
8680 circleNames: [' ToolBox' , ' Robohan' ],
8781 description:
8882 ' ハードウェアの基礎を学びます。電子回路、センサ、 メカ機構などを扱います。' ,
8983 },
9084 {
91- date: date (4 , 22 ),
9285 title: ' TypeScript' ,
9386 circleNames: [' GGC' ],
9487 description:
9588 ' TypeScriptの基礎を学びます。TypeScriptはwebサイトの作成に使用されます。' ,
9689 },
9790 {
98- date: date (4 , 23 ),
9991 title: ' C/C++' ,
10092 circleNames: [' RAINBOU' ],
10193 description:
@@ -134,7 +126,10 @@ const dateFormat = new Intl.DateTimeFormat('ja-JP', {
134126 <ul class =" grid grid-cols-[repeat(auto-fit,minmax(18rem,1fr))] gap-5" >
135127 {
136128 items2 .map (({ date , ... item }) => (
137- <WorkshopCard { ... item } date = { dateFormat .format (date )} />
129+ <WorkshopCard
130+ { ... item }
131+ date = { date ? dateFormat .format (date ) : undefined }
132+ />
138133 ))
139134 }
140135 </ul >
0 commit comments