File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,10 @@ const keynoters = defineCollection({
5959 } ) ,
6060} ) ;
6161
62- // Shared data fetching function
6362async function getCollectionsData ( ) {
6463 const speakersData = await loadData ( import . meta. env . EP_SPEAKERS_API ) ;
6564 const sessionsData = await loadData ( import . meta. env . EP_SESSIONS_API ) ;
6665
67- // Create indexed versions for efficient lookups
6866 const speakersById = Object . entries (
6967 speakersData as Record < string , { } >
7068 ) . reduce (
@@ -173,17 +171,14 @@ interface ScheduleData {
173171
174172const days = defineCollection ( {
175173 loader : async ( ) : Promise < any [ ] > => {
176- // Type assertion to specify the expected structure of the loaded data
177174 const schedule = ( await loadData (
178175 import . meta. env . EP_SCHEDULE_API
179176 ) ) as ScheduleData ;
180177
181- // Check if schedule is empty
182178 if ( ! schedule || Object . keys ( schedule ) . length === 0 ) {
183179 return [ ] ;
184180 }
185181
186- // Now TypeScript knows schedule has days property
187182 return Object . entries ( schedule . days ) . map ( ( [ date , data ] : [ string , any ] ) => ( {
188183 id : date ,
189184 ...data ,
You can’t perform that action at this time.
0 commit comments