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';
2
2
import React from 'react' ;
3
3
import { Metadata } from 'next' ;
4
4
import { PastEvents } from './pastEvents' ;
5
+ import { fetchPastEvents } from '../../../modules/meetup/queries/past-events.api' ;
6
+ import _uniq from 'lodash/uniq' ;
5
7
6
8
export const revalidate = 3600 ;
7
9
const DEFAULT_YEAR = `${ new Date ( ) . getFullYear ( ) } ` ;
@@ -35,3 +37,15 @@ export async function generateMetadata({ params }: { params: Promise<{ year?: st
35
37
} ,
36
38
} ;
37
39
}
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 3
3
axopen ,
4
4
bedrock ,
5
5
CBTW ,
6
+ fulll ,
6
7
indy ,
7
8
leWagon ,
8
9
malt ,
@@ -15,6 +16,32 @@ import {
15
16
} from './sponsors' ;
16
17
17
18
export 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
+ } ,
18
45
'https://www.meetup.com/lyonjs/events/306419959' : {
19
46
sponsor : axopen ,
20
47
talks : [
You can’t perform that action at this time.
0 commit comments