fix(production) : prevent hydration and service failures
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import Script from "next/script";
|
||||
|
||||
const clientId = process.env.NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID?.trim();
|
||||
|
||||
export function GoogleAdsense() {
|
||||
@@ -8,10 +6,9 @@ export function GoogleAdsense() {
|
||||
}
|
||||
|
||||
return (
|
||||
<Script
|
||||
id="google-adsense"
|
||||
<script
|
||||
async
|
||||
src={`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${encodeURIComponent(clientId)}`}
|
||||
strategy="lazyOnload"
|
||||
crossOrigin="anonymous"
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user