Skip to content

Commit b8f5783

Browse files
committed
Fix: do not use script tag in next/head warning
1 parent 29c3f17 commit b8f5783

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/next-pagesdir.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { start } from "./start";
2121
import type { RegisterLink, RegisteredLinkProps } from "./link";
2222
import { setLink } from "./link";
2323
import { setUseLang } from "./i18n";
24+
import Script from "next/script";
2425
import "./dsfr/dsfr.css";
2526
import "./dsfr/utility/icons/icons.css";
2627

@@ -175,7 +176,7 @@ export function createNextDsfrIntegrationApi(
175176
/>
176177
</>
177178
)}
178-
<script
179+
<Script
179180
dangerouslySetInnerHTML={{
180181
"__html": getScriptToRunAsap(defaultColorScheme)
181182
}}

0 commit comments

Comments
 (0)