Files
web/apps/scandic-web/components/TrackingSDK/AdobeSDKScript.tsx
Linus Flood 6311ec6eca Merged in fix/sw-2763-external-scripts (pull request #2104)
fix: try/catch external scripts to avoid them breaking our page #sw-2763

* fix: try/catch external scripts to avoid them breaking our page #sw-2763


Approved-by: Joakim Jäderberg
2025-05-19 09:21:02 +00:00

19 lines
438 B
TypeScript

import * as Sentry from "@sentry/nextjs"
import Script from "next/script"
import { env } from "@/env/server"
export default function AdobeSDKScript() {
return env.ADOBE_SDK_SCRIPT_SRC ? (
<Script
data-cookieconsent="statistics"
src={env.ADOBE_SDK_SCRIPT_SRC}
async
onError={(e) => {
console.error("Failed to load AdobeSDK script", e)
Sentry.captureException(e)
}}
/>
) : null
}