Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).then(intercomAppId => {
if (intercomAppId) {
Scrivito.finishLoading().then(() => {
installIntercom(intercomAppId);
this.setState({ intercomAppId });
});
}
});
}
export default function cookieConsentGiven() {
return Scrivito.finishLoading().then(() => cookiePromise);
}
import * as ReactDOM from "react-dom";
import * as Scrivito from "scrivito";
import "./Objs";
import "./Widgets";
import App from "./App";
import "./config";
import "./assets/stylesheets/index.scss";
if (window.preloadDump) {
Scrivito.preload(window.preloadDump).then(({ dumpLoaded }) => {
dumpLoaded ? hydrateApp() : renderApp();
});
} else {
window.prerenderReady = false;
renderApp();
Scrivito.finishLoading().then(() => {
window.prerenderReady = true;
});
}
function renderApp() {
ReactDOM.render(, document.getElementById("application"));
}
function hydrateApp() {
ReactDOM.hydrate(, document.getElementById("application"), () =>
Scrivito.updateContent()
);
}