fix: corrige le typage de Évènement.affiche et améliore le style des balises iframe
This commit is contained in:
parent
ad87c1263c
commit
f7ab4d5f71
2 changed files with 24 additions and 7 deletions
|
|
@ -40,7 +40,7 @@ export const evenementFromContentfull = ({
|
||||||
slug: slug as string,
|
slug: slug as string,
|
||||||
description: description as Document,
|
description: description as Document,
|
||||||
date: date as ContentfulDate,
|
date: date as ContentfulDate,
|
||||||
affiche,
|
affiche: affiche as ContentfulAsset | undefined,
|
||||||
lieu: lieu as string | undefined,
|
lieu: lieu as string | undefined,
|
||||||
lieuUrl: lieuUrl as string | undefined,
|
lieuUrl: lieuUrl as string | undefined,
|
||||||
position,
|
position,
|
||||||
|
|
@ -57,8 +57,24 @@ export const sortByDate = (evenements: Entry<ContentFulEvenement>[]): Entry<Cont
|
||||||
|
|
||||||
type ContentfulDate = `${number}-${number}-${number}T${number}:${number}:${number}Z`
|
type ContentfulDate = `${number}-${number}-${number}T${number}:${number}:${number}Z`
|
||||||
|
|
||||||
interface Évènement {
|
interface ContentfulAsset {
|
||||||
nom: string, slug: string, description: Document, date: ContentfulDate, affiche: unknown, lieu?: string | undefined, lieuUrl?: string | undefined, position: unknown, album?: string | undefined
|
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 {
|
function estÀVenir(évènement: Évènement): boolean {
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ const Wrapper = lieuUrl ? 'a' : 'div'
|
||||||
src={`${album}/player/`}
|
src={`${album}/player/`}
|
||||||
width="100%"
|
width="100%"
|
||||||
height="500"
|
height="500"
|
||||||
|
style="border: 0;"
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
allowfullscreen
|
allowfullscreen
|
||||||
></iframe>
|
></iframe>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue