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,
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -68,11 +68,12 @@ const Wrapper = lieuUrl ? 'a' : 'div'
|
|||
<div class="gallery-section">
|
||||
<h2>Retour en photo</h2>
|
||||
<div class="flickr-embed">
|
||||
<iframe
|
||||
<iframe
|
||||
src={`${album}/player/`}
|
||||
width="100%"
|
||||
height="500"
|
||||
frameborder="0"
|
||||
width="100%"
|
||||
height="500"
|
||||
style="border: 0;"
|
||||
frameborder="0"
|
||||
allowfullscreen
|
||||
></iframe>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue