resistants/src/main.tsx

25 lines
507 B
TypeScript
Raw Normal View History

2023-02-23 22:03:06 +00:00
import React from "react";
import ReactDOM from "react-dom/client";
import { App } from "./App";
2023-01-29 20:27:02 +00:00
2023-02-25 21:12:59 +00:00
console.log("Starting app");
const renderResistants = () => {
console.log("Rendering app");
2023-02-25 21:02:50 +00:00
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<App />
</React.StrictMode>
);
2023-02-25 21:12:59 +00:00
};
2023-02-25 21:02:50 +00:00
2023-02-25 21:28:57 +00:00
// @ts-ignore
window.Squarespace.onInitialize(Y, function () {
2023-02-25 21:02:50 +00:00
console.log("re-rendering");
renderResistants();
});
2023-02-25 21:32:47 +00:00
// renderResistants();
2023-02-25 21:12:59 +00:00
console.log("done");