fix: use Squarespace.onInitialize

proto-module-actu-react
Jalil Arfaoui 2023-02-25 22:28:57 +01:00
parent ebe38c317d
commit b2181adffe
3 changed files with 2 additions and 23 deletions

View File

@ -13,7 +13,6 @@
"@mantine/core": "^5.10.3",
"@mantine/hooks": "^5.10.3",
"@tabler/icons-react": "^2.2.0",
"history": "^5.3.0",
"mapbox-gl": "^2.12.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",

View File

@ -1,6 +1,5 @@
import React from "react";
import ReactDOM from "react-dom/client";
import { createBrowserHistory } from "history";
import { App } from "./App";
console.log("Starting app");
@ -14,8 +13,8 @@ const renderResistants = () => {
);
};
const browserHistory = createBrowserHistory();
browserHistory.listen(() => {
// @ts-ignore
window.Squarespace.onInitialize(Y, function () {
console.log("re-rendering");
renderResistants();
});

View File

@ -75,15 +75,6 @@ __metadata:
languageName: node
linkType: hard
"@babel/runtime@npm:^7.7.6":
version: 7.21.0
resolution: "@babel/runtime@npm:7.21.0"
dependencies:
regenerator-runtime: ^0.13.11
checksum: 7b33e25bfa9e0e1b9e8828bb61b2d32bdd46b41b07ba7cb43319ad08efc6fda8eb89445193e67d6541814627df0ca59122c0ea795e412b99c5183a0540d338ab
languageName: node
linkType: hard
"@babel/types@npm:^7.18.6":
version: 7.20.7
resolution: "@babel/types@npm:7.20.7"
@ -1476,15 +1467,6 @@ __metadata:
languageName: node
linkType: hard
"history@npm:^5.3.0":
version: 5.3.0
resolution: "history@npm:5.3.0"
dependencies:
"@babel/runtime": ^7.7.6
checksum: d73c35df49d19ac172f9547d30a21a26793e83f16a78386d99583b5bf1429cc980799fcf1827eb215d31816a6600684fba9686ce78104e23bd89ec239e7c726f
languageName: node
linkType: hard
"hoist-non-react-statics@npm:^3.3.1":
version: 3.3.2
resolution: "hoist-non-react-statics@npm:3.3.2"
@ -2230,7 +2212,6 @@ __metadata:
"@types/react": ^18.0.26
"@types/react-dom": ^18.0.9
"@vitejs/plugin-react-swc": ^3.0.0
history: ^5.3.0
mapbox-gl: ^2.12.1
prettier: ^2.8.4
prop-types: ^15.8.1