fix: corrige le typage de Évènement.affiche et améliore le style des balises iframe

This commit is contained in:
Jalil Arfaoui 2026-01-12 21:48:38 +01:00
parent ad87c1263c
commit f7ab4d5f71
2 changed files with 24 additions and 7 deletions

View file

@ -40,7 +40,7 @@ export const evenementFromContentfull = ({
slug: slug as string,
description: description as Document,
date: date as ContentfulDate,
affiche,
affiche: affiche as ContentfulAsset | undefined,
lieu: lieu as string | undefined,
lieuUrl: lieuUrl as string | undefined,
position,
@ -57,8 +57,24 @@ export const sortByDate = (evenements: Entry<ContentFulEvenement>[]): Entry<Cont
type ContentfulDate = `${number}-${number}-${number}T${number}:${number}:${number}Z`
interface Évènement {
nom: string, slug: string, description: Document, date: ContentfulDate, affiche: unknown, lieu?: string | undefined, lieuUrl?: string | undefined, position: unknown, album?: string | undefined
interface ContentfulAsset {
fields: {
file: {
url: string;
}
}
}
export interface Évènement {
nom: string;
slug: string;
description: Document;
date: ContentfulDate;
affiche: ContentfulAsset | undefined;
lieu: string | undefined;
lieuUrl: string | undefined;
position: unknown;
album: string | undefined;
}
function estÀVenir(évènement: Évènement): boolean {

View file

@ -72,6 +72,7 @@ const Wrapper = lieuUrl ? 'a' : 'div'
src={`${album}/player/`}
width="100%"
height="500"
style="border: 0;"
frameborder="0"
allowfullscreen
></iframe>