We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21a39e2 commit f1d4a35Copy full SHA for f1d4a35
1 file changed
src/AdUnit.tsx
@@ -36,11 +36,12 @@ export const AdUnit = ({
36
}: AdUnitProps): JSX.Element | null => {
37
const pathname = usePathname();
38
39
+ // biome-ignore lint/correctness/useExhaustiveDependencies: Refresh ads when pathname changes
40
useEffect(() => {
41
// biome-ignore lint/suspicious/noAssignInExpressions: adsbygoogle needed
42
// biome-ignore lint/suspicious/noExplicitAny: needed to cast to any in order to access adsbygoogle
43
((window as any).adsbygoogle = (window as any).adsbygoogle || []).push({});
- }, []);
44
+ }, [pathname]);
45
46
const _publisherId =
47
process.env.NEXT_PUBLIC_ADSENSE_PUBLISHER_ID ?? publisherId;
0 commit comments