File tree Expand file tree Collapse file tree
evenements-precedents/[year] Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import Content from './content.mdx';
55export default function APropos ( ) {
66 return < Content /> ;
77}
8- export const revalidate = 3600 ;
98const title = 'LyonJS | À propos' ;
109const description =
1110 "Qu'est-ce que LyonJS, comment le meetup est organisé ? Comment participer ? Qui sont les organisateurs ?" ;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import Content from './content.mdx';
55export default function BudgetEtFinancement ( ) {
66 return < Content /> ;
77}
8- export const revalidate = 3600 ;
98const title = 'LyonJS | Budget et financement de l’association' ;
109const description = "Quelles sont les dépenses de l'association LyonJS, comment elle se finance" ;
1110
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ export default function BecomeSponsor() {
99 </ main >
1010 ) ;
1111}
12- export const revalidate = 3600 ;
1312const title = 'LyonJS | Devenir sponsor' ;
1413const description = 'Vous souhaitez sponsoriser un événement de LyonJS, voici toutes les informations nécessaires' ;
1514
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ import { fetchPastEvents } from '../../../modules/meetup/queries/past-events.api
88import { notFound } from 'next/navigation' ;
99import { Metadata } from 'next' ;
1010
11- export const revalidate = 3600 ;
12-
1311export async function generateStaticParams ( ) {
1412 const events = await fetchPastEvents ( ) ;
1513 return events . map ( ( event ) => ( { slug : slugEventTitle ( event ) } ) ) ;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import React from 'react';
33import { Metadata } from 'next' ;
44import { PastEvents } from './pastEvents' ;
55import { fetchPastEvents } from '../../../modules/meetup/queries/past-events.api' ;
6- export const revalidate = 3600 ;
76const DEFAULT_YEAR = `${ new Date ( ) . getFullYear ( ) } ` ;
87
98export default async function PastEventsPage ( { params } : { params : Promise < { year ?: string } > } ) {
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import Content from './content.mdx';
55export default function LyonJS100 ( ) {
66 return < Content /> ;
77}
8- export const revalidate = 3600 ;
98const title = 'LyonJS | LyonJS 💯' ;
109const description =
1110 "Qu'est ce que le LyonJS 100 ? Comment participer à la journée de conférence ? Les replays des conférences" ;
Original file line number Diff line number Diff line change 1+ import { cache } from 'react' ;
12import { Event } from '../../event/types' ;
23import { gql } from 'graphql-request' ;
34import { client , Edges , LYONJS_MEETUP_ID } from '../api' ;
@@ -38,9 +39,9 @@ const query = gql`
3839 }
3940` ;
4041
41- export const fetchPastEvents = async ( ) : Promise < Array < Event > > => {
42+ export const fetchPastEvents = cache ( async ( ) : Promise < Array < Event > > => {
4243 const meetupEventsResponse = await client . request < ResponseType > ( query , { id : LYONJS_MEETUP_ID } ) ;
4344 const pastEvents = meetupEventsResponse ?. group ?. events ?. edges . map ( ( it ) => it . node ) . toReversed ( ) || [ ] ;
4445
4546 return pastEvents ;
46- } ;
47+ } ) ;
You can’t perform that action at this time.
0 commit comments