import { type FC } from 'hono/jsx' const isDev = process.env.NODE_ENV !== 'production' const Layout: FC = ({ children, title, props }) => {title ?? 'hype'} {props.reset && } {props.pico && }
{children}
{isDev && } const RELOAD_SCRIPT = '{let c=false;const e=new EventSource("/__hype/reload");e.onopen=()=>{if(c)location.reload();c=true};e.onerror=()=>{e.close();let d=50;setTimeout(function r(){fetch("/__hype/reload").then(()=>location.reload()).catch(()=>{d=Math.min(d*1.5,2000);setTimeout(r,d)})},d)}}' export const ReloadScript: FC = () => isDev ?