From 15d28d3e793a9b06e7919ec0c610eb7e16095ef6 Mon Sep 17 00:00:00 2001
From: Legrand Thomas <18073293+DnzzL@users.noreply.github.com>
Date: Fri, 2 Oct 2026 12:55:35 +0200
Subject: [PATCH 1/2] fix(console): supprimer les erreurs console restantes du
frontend
`BaseCard` laissait fuiter ses props dans le DOM (`rawDate`, `onSite`) et la
banniere des pages thematiques sans image recevait un `src` vide. Le logo des
financeurs recevait l'objet media au lieu de son URL, donc aucune image ne
s'affichait. Les scripts passent par next/script, six ratios width/height
correspondent a nouveau a la boite rendue, deux index d'animation sont bornes.
---
frontend/src/app/[locale]/_partials/footer.tsx | 2 +-
frontend/src/app/[locale]/_partials/header.tsx | 2 +-
.../[locale]/positions/_partials/Animations.tsx | 14 +++++++-------
frontend/src/app/layout.tsx | 15 +++++++++++----
.../components/atoms/Pagination/Pagination.tsx | 4 ++--
frontend/src/components/atoms/Title/Title.tsx | 2 +-
.../components/molecules/BaseCard/BaseCard.tsx | 2 --
.../ThematicHeroBlock/ThematicHeroBlock.tsx | 5 ++++-
frontend/src/components/ui/carousel.tsx | 4 ++--
frontend/src/lib/formatters/thematics.ts | 2 +-
10 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/frontend/src/app/[locale]/_partials/footer.tsx b/frontend/src/app/[locale]/_partials/footer.tsx
index 76a99c290..3e75dbe8c 100644
--- a/frontend/src/app/[locale]/_partials/footer.tsx
+++ b/frontend/src/app/[locale]/_partials/footer.tsx
@@ -54,7 +54,7 @@ const Footer = () => {
src="/images/dataforgood.svg"
alt={t('title')}
width={212}
- height={48}
+ height={44}
className="object-contain"
/>
diff --git a/frontend/src/app/[locale]/_partials/header.tsx b/frontend/src/app/[locale]/_partials/header.tsx
index f43c7d2f7..a97a486b1 100644
--- a/frontend/src/app/[locale]/_partials/header.tsx
+++ b/frontend/src/app/[locale]/_partials/header.tsx
@@ -165,7 +165,7 @@ const Header = () => {
src="/images/dataforgood.svg"
alt={t('header.title')}
width={230}
- height={43}
+ height={48}
className="w-[176px] lg:w-[230px] object-contain"
/>
diff --git a/frontend/src/app/[locale]/positions/_partials/Animations.tsx b/frontend/src/app/[locale]/positions/_partials/Animations.tsx
index f9a2cc285..c85dacf1f 100644
--- a/frontend/src/app/[locale]/positions/_partials/Animations.tsx
+++ b/frontend/src/app/[locale]/positions/_partials/Animations.tsx
@@ -33,7 +33,7 @@ export default function Animation({ animationData, handleSkipClick }: {
{ e.preventDefault(); handleSkipClick(); }} className="absolute z-1 top-[calc(100dvh-40px)] right-[40px] text-grey-text flex flex-col items-center hover:text-black">
{t('skipLink')}
-
+
{/* Screen 1 */}
@@ -47,7 +47,7 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 2 */}
0 && animationData.images[0].image.url || ""}
+ src={animationData.images.length > 0 && animationData.images[0].image.url || "/images/default-image.svg"}
alt={animationData.images.length > 0 && animationData.images[0].image.altText || ""}
width={1250}
height={1089}
@@ -64,7 +64,7 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 3 */}
1 && animationData.images[1].image.url || ""}
+ src={animationData.images.length > 1 && animationData.images[1].image.url || "/images/default-image.svg"}
alt={animationData.images.length > 1 && animationData.images[1].image.altText || ""}
width={1250}
height={1089}
@@ -81,8 +81,8 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 4 */}
1 && animationData.images[2].image.url || ""}
- alt={animationData.images.length > 1 && animationData.images[2].image.altText || ""}
+ src={animationData.images.length > 2 && animationData.images[2].image.url || "/images/default-image.svg"}
+ alt={animationData.images.length > 2 && animationData.images[2].image.altText || ""}
width={1250}
height={1089}
className='absolute top-[7.5vh] h-[85vh] object-contain'
@@ -98,8 +98,8 @@ export default function Animation({ animationData, handleSkipClick }: {
{/* Screen 5 */}
1 && animationData.images[3].image.url || ""}
- alt={animationData.images.length > 1 && animationData.images[3].image.altText || ""}
+ src={animationData.images.length > 3 && animationData.images[3].image.url || "/images/default-image.svg"}
+ alt={animationData.images.length > 3 && animationData.images[3].image.altText || ""}
width={1250}
height={1089}
className='absolute top-[7.5vh] h-[85vh] object-contain'
diff --git a/frontend/src/app/layout.tsx b/frontend/src/app/layout.tsx
index e0bae0f53..71fec20ca 100644
--- a/frontend/src/app/layout.tsx
+++ b/frontend/src/app/layout.tsx
@@ -1,4 +1,5 @@
import clsx from 'clsx';
+import Script from 'next/script';
import { DM_Mono } from 'next/font/google';
const dmMono = DM_Mono({
@@ -29,13 +30,19 @@ export default function RootLayout({
return (
-