diff --git a/pages/_app.tsx b/pages/_app.tsx index bd7ab15..5196ca5 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -1,12 +1,14 @@ import { globalCss } from "@obolnetwork/obol-ui"; import type { AppProps } from "next/app"; import TopLeftBg from "../public/backgrounds/top-left-bg.svg"; +import { useEffect } from "react"; +import { useRouter } from "next/router"; const globalStyles = globalCss({ html: { overflowX: "hidden", }, - body: { + body: { background: `url(${TopLeftBg.src}) left top no-repeat`, backgroundColor: "$bg01", padding: 0, @@ -21,6 +23,28 @@ const globalStyles = globalCss({ function MyApp({ Component, pageProps }: AppProps) { globalStyles(); + const router = useRouter(); + + useEffect(() => { + if (router.pathname !== "/blocked") { + const script = document.createElement("script"); + script.src = "https://app.termly.io/embed.min.js"; + script.type = "text/javascript"; + script.async = true; + script.setAttribute("data-auto-block", "on"); + script.setAttribute( + "data-website-uuid", + "01eadf2f-d1f3-4db1-bdce-a3cb1cd9f4d7" + ); + + script.integrity = + "eb05b794d3ff3828122578afacb94693563557be9036d4dc882d70ce63d17a1c"; + script.crossOrigin = "anonymous"; + + document.body.appendChild(script); + } + }, [router.pathname]); + return ; } diff --git a/pages/_document.tsx b/pages/_document.tsx index db97fe9..b457092 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -14,7 +14,7 @@ export default class Document extends NextDocument { return ( -