import React from "react";
import ReactDOM from "react-dom/client";
import { App } from "./App";

console.log("Starting app");

const renderResistants = () => {
  console.log("Rendering app");
  ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
    <React.StrictMode>
      <App />
    </React.StrictMode>
  );
};

// @ts-ignore
window.Squarespace.onInitialize(Y, function () {
  console.log("re-rendering");
  renderResistants();
});

renderResistants();

console.log("done");
