improve not found for service

This commit is contained in:
Schneider Roland
2025-05-25 14:52:31 +02:00
parent 6866c0e41c
commit 97feef9395
4 changed files with 24 additions and 9 deletions

View File

@@ -9,11 +9,12 @@ export interface Props {
config: YogaSingleService_Plain
}
const OurServiceItemComponent = ({config: {header,description,image}}: Props) => {
const OurServiceItemComponent = ({config: {header,description,image,name}}: Props) => {
const imageFile: StrapiFile = image as StrapiFile;
if (!imageFile || !imageFile.url) {
return null
}
const path = '/services/' + name;
return (
<div className={styles.serviceSlide}>
@@ -28,7 +29,7 @@ const OurServiceItemComponent = ({config: {header,description,image}}: Props) =>
<h3>{header}</h3>
<p>{description}</p>
<div className="btn_wrapper">
<Link href="/services" className="text-decoration-none"><i
<Link href={path} className="text-decoration-none"><i
className="fa-solid fa-arrow-right" aria-hidden="true"></i></Link>
</div>
</div>