silverwolf-x's picture
download
raw
490 Bytes
import Image from "next/image";
export default function PostBody({ content }) {
const renderedContent = content.map((item) => {
if (item.__typename === "Text") {
return <div dangerouslySetInnerHTML={{ __html: item.html }}></div>;
} else if (item.__typename === "Image") {
return <Image src={item.url} alt="image" width={1000} height={500} />;
} else {
return null;
}
});
return <div className="max-w-2xl mx-auto article">{renderedContent}</div>;
}

Xet Storage Details

Size:
490 Bytes
·
Xet hash:
9644526b7d2a22a067f5b4067caaa42cd0a762043a6460e28d59b50e79c897b5

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.