21 lines
359 B
TypeScript
21 lines
359 B
TypeScript
import React from "react";
|
|
|
|
export interface JsonLDProps {
|
|
data: object;
|
|
}
|
|
|
|
class JsonLD extends React.Component<JsonLDProps, undefined> {
|
|
render() {
|
|
return (
|
|
<script
|
|
type="application/ld+json"
|
|
dangerouslySetInnerHTML={{
|
|
__html: JSON.stringify(this.props.data),
|
|
}}
|
|
/>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default JsonLD;
|