@@ -0,0 +1,16 @@
|
||||
"use client";
|
||||
|
||||
import Script from "next/script";
|
||||
import type { HomeData } from "@/lib/api/types";
|
||||
import { startApplication } from "@/lib/client/application";
|
||||
import { startTracker } from "@/lib/client/analytics";
|
||||
import type { SeoBootstrap } from '@/lib/seo';
|
||||
import type { PageBootstrap, SiteSharedData } from '@/lib/page-data';
|
||||
import type { NavigationEntry } from '@/lib/site-navigation';
|
||||
|
||||
/** Initialize the reference interactions once, after React finishes hydration. */
|
||||
export function SiteRuntime({home,homeLoaded=true,seo,page,session,shared}: {home: HomeData;homeLoaded?:boolean;seo?:SeoBootstrap;page?:PageBootstrap;navigation?:NavigationEntry[];session?:PageBootstrap['session'];shared?:SiteSharedData}) {
|
||||
return <Script src="/scripts/site-runtime.js" strategy="afterInteractive" onReady={()=>{
|
||||
startTracker();startApplication(home,homeLoaded,seo,page,session,shared);
|
||||
}} />;
|
||||
}
|
||||
Reference in New Issue
Block a user