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,20 +114,8 @@ 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}
variants={itemVariants}
className="h-full"
>
<CardWrapper
{...wrapperProps}
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
? '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'
}`}
>
<div className="absolute inset-0 bg-[#0a192f] z-0"> <div className="absolute inset-0 bg-[#0a192f] z-0">
<Image <Image
src={company.backgroundImage} src={company.backgroundImage}
@@ -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)
}));