File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66import { usePathname } from "next/navigation" ;
77import type { ScriptProps } from "next/script" ;
8- import Script from "next/script" ;
98// biome-ignore lint/correctness/noUnusedImports: React refers to a UMD global, but the current file is a module.
109import React , { useEffect } from "react" ;
1110import { isPublisherId } from "./utils" ;
@@ -46,8 +45,7 @@ export const GoogleAdSense = ({
4645
4746 // Re-insert the script
4847 const script = document . createElement ( "script" ) ;
49- script . src =
50- "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXX" ;
48+ script . src = `https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-${ _publisherId } ` ;
5149 script . async = true ;
5250 script . crossOrigin = "anonymous" ;
5351 document . head . appendChild ( script ) ;
You can’t perform that action at this time.
0 commit comments