fix(types): resolve typecheck errors for SubCompanyTiles and standorteLocations
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Successful in 55s
Build & Deploy / 🏗️ Build (push) Successful in 1m40s
Build & Deploy / 🚀 Deploy (push) Successful in 24s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 41s
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-06-14 22:02:36 +02:00
parent 233509db67
commit aaa1a8793c
2 changed files with 58 additions and 29 deletions

View File

@@ -114,33 +114,21 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) {
const positionClass = bgPositionClasses[index % bgPositionClasses.length]; const positionClass = bgPositionClasses[index % bgPositionClasses.length];
const animationClass = animationClasses[index % animationClasses.length]; const animationClass = animationClasses[index % animationClasses.length];
return ( const CardContent = (
<motion.div <>
key={index} <div className="absolute inset-0 bg-[#0a192f] z-0">
variants={itemVariants} <Image
className="h-full" src={company.backgroundImage}
> alt="Background"
<CardWrapper fill
{...wrapperProps} className={`object-cover transition-all duration-1000 ease-out ${
className={`group relative overflow-hidden aspect-[4/3] flex flex-col justify-center items-center shadow-xl transition-all duration-500 bg-neutral-dark block w-full h-full sm:rounded-xl select-none ${ isCurrent
isCurrent ? 'opacity-30 grayscale-0 scale-105'
? 'border border-white/5 hover:shadow-2xl hover:-translate-y-1 hover:border-white/10 cursor-pointer' : 'opacity-40 grayscale-[50%] group-hover:opacity-30 group-hover:grayscale-0 group-hover:scale-110'
: 'border border-white/5 hover:shadow-2xl hover:-translate-y-1 hover:border-white/10 cursor-pointer' }`}
}`} sizes="(max-width: 768px) 100vw, 33vw"
> />
<div className="absolute inset-0 bg-[#0a192f] z-0"> </div>
<Image
src={company.backgroundImage}
alt="Background"
fill
className={`object-cover transition-all duration-1000 ease-out ${
isCurrent
? 'opacity-30 grayscale-0 scale-105'
: 'opacity-40 grayscale-[50%] group-hover:opacity-30 group-hover:grayscale-0 group-hover:scale-110'
}`}
sizes="(max-width: 768px) 100vw, 33vw"
/>
</div>
{/* Heavy dark gradient overlay to make logos pop */} {/* Heavy dark gradient overlay to make logos pop */}
<div className={`absolute inset-0 z-0 transition-colors duration-700 mix-blend-multiply ${ <div className={`absolute inset-0 z-0 transition-colors duration-700 mix-blend-multiply ${
@@ -235,7 +223,36 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) {
</div> </div>
)} )}
</CardWrapper> </>
);
const sharedClass = `group relative overflow-hidden aspect-[4/3] flex flex-col justify-center items-center shadow-xl transition-all duration-500 bg-neutral-dark block w-full h-full sm:rounded-xl select-none ${
isCurrent
? 'border border-white/5 hover:shadow-2xl hover:-translate-y-1 hover:border-white/10 cursor-pointer'
: 'border border-white/5 hover:shadow-2xl hover:-translate-y-1 hover:border-white/10 cursor-pointer'
}`;
return (
<motion.div
key={index}
variants={itemVariants}
className="h-full"
>
{hasUrl ? (
isExternal ? (
<a href={company.url} target="_blank" rel="noopener noreferrer" className={sharedClass}>
{CardContent}
</a>
) : (
<Link href={company.url as string} className={sharedClass}>
{CardContent}
</Link>
)
) : (
<div className={sharedClass}>
{CardContent}
</div>
)}
</motion.div> </motion.div>
); );
})} })}

View File

@@ -160,3 +160,15 @@ export const standorteData: StandortData[] = [
export function getStandortById(id: string): StandortData | undefined { export function getStandortById(id: string): StandortData | undefined {
return standorteData.find(s => s.id === id); return standorteData.find(s => s.id === id);
} }
// Convert StandortData to the Location format required by the map
export const standorteLocations = standorteData.map((standort) => ({
id: standort.id,
name: standort.shortName,
type: standort.type,
x: standort.id === 'kirchheilingen' ? 52 : standort.id === 'buelstedt' ? 37 : 85,
y: standort.id === 'kirchheilingen' ? 55 : standort.id === 'buelstedt' ? 25.33 : 41.1,
description: standort.name,
href: `/standorte/${standort.id}`,
details: standort.keyFeatures.de.slice(0, 3)
}));