ThreadCount Community edition
Uniform stock management for healthcare linen rooms. Licensed under the GNU AGPL v3.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/* Emits a JSON-LD block.
|
||||
*
|
||||
* A server component, so the markup is in the HTML a crawler is served rather than something it
|
||||
* has to execute JavaScript to discover. The JSON is serialised rather than templated, and `<`
|
||||
* is escaped so a stray character in any content string can't close the script tag early. */
|
||||
export default function JsonLd({ data }: { data: object }) {
|
||||
const json = JSON.stringify(data).replace(/</g, "\\u003c");
|
||||
return <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: json }} />;
|
||||
}
|
||||
Reference in New Issue
Block a user