Skip to content

Commit 0f3790e

Browse files
committed
fix: add adsense add in docs/[name]
1 parent 6b5af89 commit 0f3790e

File tree

2 files changed

+19
-33
lines changed

2 files changed

+19
-33
lines changed

apps/www/app/docs/@aside/[name]/page.tsx

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
CardHeader,
66
CardTitle,
77
} from "@workspace/ui/components/card";
8+
import Script from "next/script";
89

910
export default function HookAside() {
1011
return (
@@ -30,39 +31,24 @@ export default function HookAside() {
3031
</CardContent>
3132
</Card>
3233

33-
<Card className="mt-4">
34-
<CardHeader>
35-
<CardTitle>Popular Hooks</CardTitle>
36-
</CardHeader>
37-
<CardContent>
38-
<div className="space-y-2 text-sm">
39-
<Link
40-
href="/docs/use-local-storage"
41-
className="block hover:text-blue-500"
42-
>
43-
useLocalStorage
44-
</Link>
45-
<Link
46-
href="/docs/use-counter"
47-
className="block hover:text-blue-500"
48-
>
49-
useCounter
50-
</Link>
51-
<Link href="/docs/use-toggle" className="block hover:text-blue-500">
52-
useToggle
53-
</Link>
54-
</div>
55-
</CardContent>
56-
</Card>
34+
<div className="mt-4">
35+
<ins
36+
className="adsbygoogle"
37+
style={{ display: "block", width: 240, height: 400 }}
38+
data-ad-client="ca-pub-1640905025052378"
39+
data-ad-slot="9540285659"
40+
data-ad-format="auto"
41+
data-full-width-responsive="true"
42+
></ins>
5743

58-
<Card className="mt-4">
59-
<CardHeader>
60-
<CardTitle>Need Help?</CardTitle>
61-
</CardHeader>
62-
<CardContent className="text-sm">
63-
<p>Check out our examples and documentation for each hook.</p>
64-
</CardContent>
65-
</Card>
44+
<Script
45+
id="adsense-docs-aside"
46+
strategy="afterInteractive"
47+
dangerouslySetInnerHTML={{
48+
__html: "(adsbygoogle = window.adsbygoogle || []).push({});",
49+
}}
50+
/>
51+
</div>
6652
</aside>
6753
);
6854
}

apps/www/app/docs/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function DocsLayout({
1212
<div className="h-[calc(100vh-64px)] flex container mx-auto">
1313
<AppSidebar />
1414
<ScrollArea className="h-[calc(100vh-64px)] container">
15-
<>{details}</>
15+
{details}
1616
</ScrollArea>
1717
<div>{aside}</div>
1818
</div>

0 commit comments

Comments
 (0)