Skip to content

Commit b60cb28

Browse files
Add the script in _document.tsx
1 parent b00c2ae commit b60cb28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/_document.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Html, Head, Main, NextScript } from 'next/document'
2-
2+
import Script from 'next/script';
33
export default function Document() {
44
return (
55
<Html lang="en" data-theme="dark">
@@ -8,7 +8,7 @@ export default function Document() {
88
<Main />
99
<NextScript />
1010
</body>
11-
<script src="/theme.js"></script>
11+
<Script src="/theme.js" />
1212
</Html>
1313
)
1414
}

0 commit comments

Comments
 (0)