mirror of
https://github.com/Since-3/since3-website.git
synced 2026-10-12 21:31:17 +00:00
13 lines
406 B
TypeScript
13 lines
406 B
TypeScript
/**
|
|
* Script that runs during HTML parsing, before the first paint.
|
|
* On the client it is rendered inert so React does not warn about script tags.
|
|
*/
|
|
export function InlineScript({ html }: { html: string }) {
|
|
return (
|
|
<script
|
|
type={typeof window === "undefined" ? "text/javascript" : "text/plain"}
|
|
suppressHydrationWarning
|
|
dangerouslySetInnerHTML={{ __html: html }}
|
|
/>
|
|
)
|
|
}
|