"use client"; //=========================================== // THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template //=========================================== import { useLayoutEffect } from "react"; function escapeHtmlAttr(str: string): string { return str.replace(/&/g, '&').replace(/"/g, '"').replace(//g, '>'); } export function SsrScript(props: { script: string, nonce?: string }) { useLayoutEffect(() => { // TODO fix workaround: React has a bug where it doesn't run the script on the first CSR render if SSR has been skipped due to suspense // As a workaround, we run the script in the `, }} /> ); }