← Files DataARCHIVED FILE

templates/data-app/base/src/main.jsx

904 Bytes · Oct 3, 2026 · 06:03 UTC

↓ Download file

import React from "react";
import { createRoot } from "react-dom/client";

// Load starter CSS before App traverses authored component stylesheet imports.
import "./theme.css";
import "./styles.css";
import "./theme-picker.css";
import "./source-preview.css";
import "./content/dashboard/dashboard.css";
import "./content/report/report.css";
import "./print.css";
import "./theme-runtime.js";
import { App } from "./App.jsx";
import reviewedSnapshot from "./data.json";

const hosted = globalThis.location?.hostname.endsWith(".chatgpt.site") ?? false;

export function DataAppRuntime() {
  return <App hosted={hosted} />;
}

if (typeof document !== "undefined") {
  document.title = reviewedSnapshot.title || "Data app";
  const root = document.getElementById("root");
  if (root) {
    createRoot(root).render(
      <React.StrictMode>
        <DataAppRuntime />
      </React.StrictMode>,
    );
  }
}

SHA-256: cbb6a40a785d8c9a867a7684cdba60c930ff6a3d8eda3137cee458c4bc3a43cc