From 2871df27b20a6b967fefa5c2bb5cc87d13c6dcb8 Mon Sep 17 00:00:00 2001
From: adilallo <39313955+adilallo@users.noreply.github.com>
Date: Tue, 26 May 2026 08:40:01 -0600
Subject: [PATCH] Fix svg loading issues
---
app/(marketing)/page.tsx | 1 +
.../cards/CaseStudy/CaseStudy.view.tsx | 21 ++++++++-------
.../sections/HeroBanner/HeroBanner.tsx | 20 +++++++-------
.../sections/HeroBanner/HeroDecor.tsx | 15 +++++++++--
next.config.mjs | 26 +++++++++++++++++--
5 files changed, 61 insertions(+), 22 deletions(-)
diff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsx
index 2a15724..4be91a2 100644
--- a/app/(marketing)/page.tsx
+++ b/app/(marketing)/page.tsx
@@ -49,6 +49,7 @@ export default function Page() {
description: t("pages.home.heroBanner.description"),
ctaText: t("pages.home.heroBanner.ctaText"),
ctaHref: t("pages.home.heroBanner.ctaHref"),
+ imageAlt: t("heroBanner.imageAlt"),
};
const cardStepsData = {
diff --git a/app/components/cards/CaseStudy/CaseStudy.view.tsx b/app/components/cards/CaseStudy/CaseStudy.view.tsx
index f90db1f..f9ea5b7 100644
--- a/app/components/cards/CaseStudy/CaseStudy.view.tsx
+++ b/app/components/cards/CaseStudy/CaseStudy.view.tsx
@@ -45,19 +45,22 @@ function CaseStudyView({
return (
{visual ? (
{visual}
) : (
-
+
)}
);
diff --git a/app/components/sections/HeroBanner/HeroBanner.tsx b/app/components/sections/HeroBanner/HeroBanner.tsx
index d8c8779..5d5d47f 100644
--- a/app/components/sections/HeroBanner/HeroBanner.tsx
+++ b/app/components/sections/HeroBanner/HeroBanner.tsx
@@ -1,12 +1,9 @@
-"use client";
-
/**
* Figma: "Sections / Hero" (see registry)
*/
import { memo } from "react";
import Image from "next/image";
-import { useTranslation } from "../../../contexts/MessagesContext";
import ContentLockup from "../../type/ContentLockup";
import HeroDecor from "./HeroDecor";
import { ASSETS, getAssetPath } from "../../../../lib/assetUtils";
@@ -25,13 +22,18 @@ interface HeroBannerProps {
description?: string;
ctaText?: string;
ctaHref?: string;
+ imageAlt?: string;
}
const HeroBanner = memo(
- ({ title, subtitle, description, ctaText, ctaHref }) => {
- const t = useTranslation();
- const imageAlt = t("heroBanner.imageAlt");
-
+ ({
+ title,
+ subtitle,
+ description,
+ ctaText,
+ ctaHref,
+ imageAlt = "Hero illustration",
+ }) => {
return (
@@ -58,7 +60,7 @@ const HeroBanner = memo(
{/* Hero Image Container */}
-
+
(
height={HERO_IMAGE_HEIGHT}
priority
sizes="(min-width: 768px) 50vw, 100vw"
- className="w-full h-auto"
+ className="size-full object-contain"
/>
diff --git a/app/components/sections/HeroBanner/HeroDecor.tsx b/app/components/sections/HeroBanner/HeroDecor.tsx
index 1481772..075ff4a 100644
--- a/app/components/sections/HeroBanner/HeroDecor.tsx
+++ b/app/components/sections/HeroBanner/HeroDecor.tsx
@@ -1,12 +1,23 @@
"use client";
-import { memo } from "react";
+import { memo, useEffect, useState } from "react";
interface HeroDecorProps {
className?: string;
}
const HeroDecor = memo(({ className = "" }) => {
+ const [grainEnabled, setGrainEnabled] = useState(false);
+
+ useEffect(() => {
+ // feTurbulence forces tiled rasterization that reads as top-down segments on
+ // first paint. Flat shapes render immediately; grain applies after paint.
+ const frame = requestAnimationFrame(() => {
+ setGrainEnabled(true);
+ });
+ return () => cancelAnimationFrame(frame);
+ }, []);
+
return (