'use client';
import {BlocksContent, BlocksRenderer} from "@strapi/blocks-react-renderer";
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}) => {
                return (
                    <YogaImageComponent
                        src={image.url}
                        // width={image.width}
                        // height={image.height}
                        alt={image.alternativeText || ""}
                    />
                );
            }
        }}
        />);
}

export default NextBlocksRenderer;
