Fix: Remove conflicting blurDataURL from HeroVideo and fix ReferencesSlider syntax error
This commit is contained in:
@@ -39,7 +39,6 @@ export function HeroVideo(props: HeroVideoProps) {
|
|||||||
|
|
||||||
const posterSrc = props.backgroundImage?.url || props.posterImage?.url || data?.posterImage?.url || defaultPoster;
|
const posterSrc = props.backgroundImage?.url || props.posterImage?.url || data?.posterImage?.url || defaultPoster;
|
||||||
const posterAlt = props.backgroundImage?.alt || data?.posterImage?.alt || "E-TIB Gruppe Baustelle";
|
const posterAlt = props.backgroundImage?.alt || data?.posterImage?.alt || "E-TIB Gruppe Baustelle";
|
||||||
const blurDataURL = (placeholders as Record<string, string>)[posterSrc] || undefined;
|
|
||||||
|
|
||||||
const ctaLabel = props.ctaLabel || props.linkText || data?.ctaLabel || 'Unternehmen entdecken';
|
const ctaLabel = props.ctaLabel || props.linkText || data?.ctaLabel || 'Unternehmen entdecken';
|
||||||
const ctaHref = props.ctaHref || props.linkHref || data?.ctaHref || '#unternehmen';
|
const ctaHref = props.ctaHref || props.linkHref || data?.ctaHref || '#unternehmen';
|
||||||
@@ -91,8 +90,6 @@ export function HeroVideo(props: HeroVideoProps) {
|
|||||||
className="object-cover z-[1] pointer-events-none filter contrast-125 saturate-110 brightness-90"
|
className="object-cover z-[1] pointer-events-none filter contrast-125 saturate-110 brightness-90"
|
||||||
sizes="100vw"
|
sizes="100vw"
|
||||||
priority
|
priority
|
||||||
placeholder={blurDataURL ? "blur" : "empty"}
|
|
||||||
blurDataURL={blurDataURL}
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Render video on top if available, but defer src to avoid blocking LCP */}
|
{/* Render video on top if available, but defer src to avoid blocking LCP */}
|
||||||
|
|||||||
@@ -46,22 +46,6 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
|||||||
const scrollLeftRef = React.useRef(0);
|
const scrollLeftRef = React.useRef(0);
|
||||||
const isDraggingRef = React.useRef(false);
|
const isDraggingRef = React.useRef(false);
|
||||||
const [isDragging, setIsDragging] = React.useState(false);
|
const [isDragging, setIsDragging] = React.useState(false);
|
||||||
const [paddingX, setPaddingX] = React.useState(24);
|
|
||||||
|
|
||||||
React.useEffect(() => {
|
|
||||||
const updatePadding = () => {
|
|
||||||
const containerEl = document.querySelector('#referenzen .container');
|
|
||||||
if (containerEl) {
|
|
||||||
const rect = containerEl.getBoundingClientRect();
|
|
||||||
const computedStyle = window.getComputedStyle(containerEl);
|
|
||||||
const pLeft = parseFloat(computedStyle.paddingLeft || '0');
|
|
||||||
setPaddingX(rect.left + pLeft);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
updatePadding();
|
|
||||||
window.addEventListener('resize', updatePadding);
|
|
||||||
return () => window.removeEventListener('resize', updatePadding);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const badge = props.badge || data?.badge || t('badge');
|
const badge = props.badge || data?.badge || t('badge');
|
||||||
const title = props.title || data?.title || t('title');
|
const title = props.title || data?.title || t('title');
|
||||||
@@ -190,6 +174,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="container relative z-10 mt-4 flex justify-center">
|
<div className="container relative z-10 mt-4 flex justify-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user