add service detail page

This commit is contained in:
Schneider Roland
2025-05-23 07:40:42 +02:00
committed by Roland Schneider
parent 35f172702a
commit 67839dbfb9
5 changed files with 68 additions and 27 deletions

View File

@@ -0,0 +1,31 @@
'use client';
import {BlocksContent, BlocksRenderer} from "@strapi/blocks-react-renderer";
import strapiApi from "@/api/strapi/strapi-api";
import React from "react";
import YogaImageComponent from "@/components/yoga.image.component";
export interface Props{
content: BlocksContent;
}
const NextBlocksRenderer = ({ content }: Props) => {
return (
<BlocksRenderer
content={content}
blocks={{
image: ({image}) => {
console.log(image);
const url = new URL(image.url);
return (
<YogaImageComponent
src={url.pathname}
width={image.width}
height={image.height}
alt={image.alternativeText || ""}
/>
);
}
}}
/>);
}
export default NextBlocksRenderer;