From 744d689a571c8079c8f9af48399f1867d7db4ef8 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Thu, 7 May 2026 11:33:21 +0200 Subject: [PATCH] feat(tiles): add 'Aktuell hier' state badge and remove pointer interactions for current active company tile Former-commit-id: cca6da9ea309033366c35f85ff4f121412a8a609 --- components/blocks/SubCompanyTiles.tsx | 43 +++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/components/blocks/SubCompanyTiles.tsx b/components/blocks/SubCompanyTiles.tsx index 613c61c13..d3b7962ed 100644 --- a/components/blocks/SubCompanyTiles.tsx +++ b/components/blocks/SubCompanyTiles.tsx @@ -47,11 +47,16 @@ const itemVariants: Variants = { visible: { opacity: 1, y: 0, transition: { duration: 0.8, ease: [0.16, 1, 0.3, 1] } }, }; +import { usePathname } from 'next/navigation'; + export function SubCompanyTiles(props: SubCompanyTilesProps) { const { data } = props; const badge = props.badge || data?.badge; const title = props.title || data?.title; const rawCompanies = props.companies || data?.companies; + const pathname = usePathname(); + const isDe = pathname?.startsWith('/de') ?? true; + const companiesData = rawCompanies?.map((c: any) => ({ title: c.title, url: c.url, @@ -77,8 +82,9 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) { viewport={{ once: true, margin: "-50px" }} > {companiesData.map((company: any, index: number) => { - const CardWrapper = company.url ? 'a' : 'div'; - const wrapperProps = company.url ? { href: company.url, target: "_blank", rel: "noopener noreferrer" } : {}; + const isCurrent = !company.url; + const CardWrapper = isCurrent ? 'div' : 'a'; + const wrapperProps = !isCurrent ? { href: company.url, target: "_blank", rel: "noopener noreferrer" } : {}; // Generate logo representation based on title const isEtib = company.title.includes('E-TIB'); @@ -93,20 +99,47 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) { >
Background
{/* Heavy dark gradient overlay to make logos pop */} -
+
+ + {/* Current Site Indicator Badge */} + {isCurrent && ( +
+
+ + + + + + {isDe ? 'Aktuell hier' : 'You are here'} + +
+
+ )}