feat(WEB-93): add Header to CMS and render it in Next

This commit is contained in:
Simon Emanuelsson
2024-02-20 09:07:17 +01:00
parent 58b82cc8b7
commit cbb53df67c
30 changed files with 612 additions and 53 deletions

View File

@@ -0,0 +1,23 @@
import { env } from "@/env/server"
import Script from "next/script"
const scriptScrs = {
// TODO: decide on naming and environments (development vs. test vs. staging etc)
development: "",
test: "https://assets.adobedtm.com/c1bd08b1e4e7/d64a7c1f5f17/launch-84c70d82a50c-staging.min.js",
production:
"https://assets.adobedtm.com/c1bd08b1e4e7/d64a7c1f5f17/launch-e56085bbe998.min.js",
}
export default function AdobeScript() {
return (
<>
<Script
strategy="beforeInteractive"
id="ensure-datalayer"
>{`window.datalayer = window.datalayer || {}`}</Script>
<Script src={scriptScrs[env.NODE_ENV]} />
</>
)
}