SurfSense/surfsense_web/app/(home)/free/layout.tsx
DESKTOP-RTLN3BA\$punk afbe6abaaf refactor(page): remove AdSenseScript component from FreeHubPage
- Eliminated the AdSenseScript import and its usage in the FreeHubPage component to streamline the code and improve performance.
2026-06-03 16:11:33 -07:00

18 lines
613 B
TypeScript

import type { ReactNode } from "react";
import { AdSenseScript } from "@/components/ads/adsense-script";
/**
* Wraps the /free hub and all /free/[model_slug] subpages. Mounting
* <AdSenseScript /> here loads adsbygoogle.js across the entire /free route
* tree, which is what powers both the manual <AdUnit /> slots and AdSense
* Auto ads. Because the script lives here (not in the root layout), Auto ads
* is naturally scoped to /free and its subpages only.
*/
export default function FreeSectionLayout({ children }: { children: ReactNode }) {
return (
<>
<AdSenseScript />
{children}
</>
);
}