fix: use Squarespace.onInitialize
parent
ebe38c317d
commit
b2181adffe
|
@ -13,7 +13,6 @@
|
||||||
"@mantine/core": "^5.10.3",
|
"@mantine/core": "^5.10.3",
|
||||||
"@mantine/hooks": "^5.10.3",
|
"@mantine/hooks": "^5.10.3",
|
||||||
"@tabler/icons-react": "^2.2.0",
|
"@tabler/icons-react": "^2.2.0",
|
||||||
"history": "^5.3.0",
|
|
||||||
"mapbox-gl": "^2.12.1",
|
"mapbox-gl": "^2.12.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ReactDOM from "react-dom/client";
|
import ReactDOM from "react-dom/client";
|
||||||
import { createBrowserHistory } from "history";
|
|
||||||
import { App } from "./App";
|
import { App } from "./App";
|
||||||
|
|
||||||
console.log("Starting app");
|
console.log("Starting app");
|
||||||
|
@ -14,8 +13,8 @@ const renderResistants = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const browserHistory = createBrowserHistory();
|
// @ts-ignore
|
||||||
browserHistory.listen(() => {
|
window.Squarespace.onInitialize(Y, function () {
|
||||||
console.log("re-rendering");
|
console.log("re-rendering");
|
||||||
renderResistants();
|
renderResistants();
|
||||||
});
|
});
|
||||||
|
|
19
yarn.lock
19
yarn.lock
|
@ -75,15 +75,6 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"@babel/types@npm:^7.18.6":
|
||||||
version: 7.20.7
|
version: 7.20.7
|
||||||
resolution: "@babel/types@npm:7.20.7"
|
resolution: "@babel/types@npm:7.20.7"
|
||||||
|
@ -1476,15 +1467,6 @@ __metadata:
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
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":
|
"hoist-non-react-statics@npm:^3.3.1":
|
||||||
version: 3.3.2
|
version: 3.3.2
|
||||||
resolution: "hoist-non-react-statics@npm:3.3.2"
|
resolution: "hoist-non-react-statics@npm:3.3.2"
|
||||||
|
@ -2230,7 +2212,6 @@ __metadata:
|
||||||
"@types/react": ^18.0.26
|
"@types/react": ^18.0.26
|
||||||
"@types/react-dom": ^18.0.9
|
"@types/react-dom": ^18.0.9
|
||||||
"@vitejs/plugin-react-swc": ^3.0.0
|
"@vitejs/plugin-react-swc": ^3.0.0
|
||||||
history: ^5.3.0
|
|
||||||
mapbox-gl: ^2.12.1
|
mapbox-gl: ^2.12.1
|
||||||
prettier: ^2.8.4
|
prettier: ^2.8.4
|
||||||
prop-types: ^15.8.1
|
prop-types: ^15.8.1
|
||||||
|
|
Loading…
Reference in New Issue