Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40fbc44

Browse files
authored
feat: add last meetup and static paths (#524)
1 parent397d646 commit40fbc44

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

‎app/evenements-precedents/[year]/page.tsx‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { H1 } from '../../../modules/atoms/remark/Titles';
22
importReactfrom'react';
33
import{Metadata}from'next';
44
import{PastEvents}from'./pastEvents';
5+
import{fetchPastEvents}from'../../../modules/meetup/queries/past-events.api';
6+
import_uniqfrom'lodash/uniq';
57

68
exportconstrevalidate=3600;
79
constDEFAULT_YEAR=`${newDate().getFullYear()}`;
@@ -35,3 +37,15 @@ export async function generateMetadata({ params }: { params: Promise<{ year?: st
3537
},
3638
};
3739
}
40+
41+
exportasyncfunctiongenerateStaticParams(){
42+
constallPastEvents=awaitfetchPastEvents();
43+
constyearsFromEvents:string[]=allPastEvents
44+
.map((event)=>newDate(event.dateTime).getFullYear())
45+
.map((year)=>year.toString());
46+
constyears=_uniq(yearsFromEvents);
47+
48+
returnyears.map((year)=>({
49+
year,
50+
}));
51+
}

‎data/data-override.ts‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
axopen,
44
bedrock,
55
CBTW,
6+
fulll,
67
indy,
78
leWagon,
89
malt,
@@ -15,6 +16,32 @@ import {
1516
}from'./sponsors';
1617

1718
exportconstdataOverride:{[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:[

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp