Skip to content

Commit eacdfc7

Browse files
committed
Tel
1 parent 2b142ae commit eacdfc7

4 files changed

Lines changed: 19 additions & 3 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { useRef, useEffect } from 'react';
2+
3+
export function CookieConsentWrapper() {
4+
const ref = useRef<HTMLDivElement>(null);
5+
6+
useEffect(() => {
7+
// Let the legacy script do its thing after mount
8+
// You can optionally load or trigger it here
9+
}, []);
10+
11+
return <div id="cookieConsent" ref={ref} suppressHydrationWarning />;
12+
}

src/components/TelemetryBody.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
44
//
55

6+
'use client';
7+
8+
import { CookieConsentWrapper } from './CookieConsentIsland';
9+
610
export default function TelemetryBody() {
711
return (
812
<>
9-
<div id="cookiebanner"></div>
13+
<CookieConsentWrapper />
1014

1115
{/* This was equivalent to the production-telemetry.html include */}
1216
{/*
@@ -20,4 +24,4 @@ export default function TelemetryBody() {
2024
*/}
2125
</>
2226
)
23-
}
27+
}

src/components/TelemetryScript.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import fs from 'fs';
77

8-
const telemetryJavaScript = fs.readFileSync('./src/app/components/telemetry.js', 'utf8');
8+
const telemetryJavaScript = fs.readFileSync('./src/components/telemetry.js', 'utf8');
99

1010
export default function TelemetryScript() {
1111
return (

0 commit comments

Comments
 (0)