Skip to content

Commit f0b4d41

Browse files
committed
fix(ads): AdSense head tag doesn't support data-nscript attribute
Replaces Next.js-optimized <Script> tag with a regular <script> (for now). See: vercel/next.js#35146 vercel/next.js#32323
1 parent 69424b1 commit f0b4d41

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

apps/frontend/src/modules/shared/components/GoogleAdSense.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
import Script from 'next/script';
2-
31
const GoogleAdSense = ({ pId }: { pId?: string }) => {
42
if (process.env.NODE_ENV !== 'production' || !pId) {
53
return null;
64
}
75

86
return (
9-
<Script
7+
<script
108
async
119
src={`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${pId}`}
1210
crossOrigin='anonymous'
13-
strategy='afterInteractive'
1411
/>
1512
);
1613
};

0 commit comments

Comments
 (0)