···22import { createRoot, hydrateRoot } from "https://esm.sh/react-dom@19.1.1/client";
33import * as ATPAPI from "https://esm.sh/@atproto/api";
44import { AuthProvider } from "../browser/passauthprovider.tsx";
55-import { App } from "../browser/landing-shared.tsx";
55+import { Root } from "../browser/landing-shared.tsx";
66+77+const initialDataEl = document.getElementById("initial-data");
88+const initialData = initialDataEl ? JSON.parse(initialDataEl.textContent!) : undefined;
99+// rule of thumb this is the only place where we can do browser-only code
610711createRoot(document.getElementById("root")!).render(
88- <AuthProvider>
99- <App type="index" />
1010- </AuthProvider>
1212+ <Root type="index" initialData={initialData}/>
1113);
1214//hydrateRoot(document.getElementById("root")!, <App />);
···22import { createRoot, hydrateRoot } from "https://esm.sh/react-dom@19.1.1/client";
33import * as ATPAPI from "https://esm.sh/@atproto/api";
44import { AuthProvider } from "./passauthprovider.tsx";
55-import { App } from "./landing-shared.tsx";
55+import { Root } from "./landing-shared.tsx";
66+77+const initialDataEl = document.getElementById("initial-data");
88+const initialData = initialDataEl ? JSON.parse(initialDataEl.textContent!) : undefined;
99+// rule of thumb this is the only place where we can do browser-only code
610711createRoot(document.getElementById("root")!).render(
88- <AuthProvider>
99- <App type="view" />
1010- </AuthProvider>
1212+ <Root type="view" initialData={initialData}/>
1113);
1214//hydrateRoot(document.getElementById("root")!, <App />);