import React from 'react'; import { JsonLd } from 'react-schemaorg'; import { FinancialProduct } from 'schema-dts'; interface Props { name: string; imageURL: string; description: string; price: string; } const ProductSchema: React.FC = ({ name, imageURL, description, price }) => { function formatPrice(input: string): string { return input.replace(/\s/g, '').replace(',', '.'); } return ( item={{ '@context': 'https://schema.org', '@type': 'FinancialProduct', name, image: imageURL, description: description, offers: { '@type': 'Offer', priceCurrency: 'EUR', price: formatPrice(price), seller: { '@type': 'Organization', name: 'Easyblue' } } }} /> ); }; export default ProductSchema;