since3-website/modules/shared/ui/components/inline-script.tsx
2026-09-25 00:45:33 +02:00

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 }}
/>
)
}