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'} + +
+
+ )}