File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
app/evenements-precedents/[year] Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import { H1 } from '../../../modules/atoms/remark/Titles';
22import React from 'react' ;
33import { Metadata } from 'next' ;
44import { PastEvents } from './pastEvents' ;
5+ import { fetchPastEvents } from '../../../modules/meetup/queries/past-events.api' ;
6+ import _uniq from 'lodash/uniq' ;
57
68export const revalidate = 3600 ;
79const DEFAULT_YEAR = `${ new Date ( ) . getFullYear ( ) } ` ;
@@ -35,3 +37,15 @@ export async function generateMetadata({ params }: { params: Promise<{ year?: st
3537 } ,
3638 } ;
3739}
40+
41+ export async function generateStaticParams ( ) {
42+ const allPastEvents = await fetchPastEvents ( ) ;
43+ const yearsFromEvents : string [ ] = allPastEvents
44+ . map ( ( event ) => new Date ( event . dateTime ) . getFullYear ( ) )
45+ . map ( ( year ) => year . toString ( ) ) ;
46+ const years = _uniq ( yearsFromEvents ) ;
47+
48+ return years . map ( ( year ) => ( {
49+ year,
50+ } ) ) ;
51+ }
Original file line number Diff line number Diff line change 33 axopen ,
44 bedrock ,
55 CBTW ,
6+ fulll ,
67 indy ,
78 leWagon ,
89 malt ,
@@ -15,6 +16,32 @@ import {
1516} from './sponsors' ;
1617
1718export const dataOverride : { [ key : string ] : Partial < Event > } = {
19+ 'https://www.meetup.com/lyonjs/events/306992187' : {
20+ sponsor : fulll ,
21+ talks : [
22+ {
23+ title : 'Refondre sans tout casser : notre migration vers une architecture microfrontend' ,
24+ speakers : [
25+ {
26+ name : 'Nicolas Lefebvre' ,
27+ } ,
28+ {
29+ name : 'Maël Martin' ,
30+ socialLink : 'https://www.linkedin.com/in/maelmartin/' ,
31+ } ,
32+ ] ,
33+ } ,
34+ {
35+ title : 'Rendre ses API idempotentes avec NestJS' ,
36+ speakers : [
37+ {
38+ name : 'Johann Pardanaud' ,
39+ socialLink : 'https://www.linkedin.com/in/johann-pardanaud/' ,
40+ } ,
41+ ] ,
42+ } ,
43+ ] ,
44+ } ,
1845 'https://www.meetup.com/lyonjs/events/306419959' : {
1946 sponsor : axopen ,
2047 talks : [
You can’t perform that action at this time.
0 commit comments