Skip to content

Commit 8d02b3d

Browse files
ndom91himself65
authored andcommitted
docs: remove carbon developer ads widget from docs sidebar (#13286)
1 parent c8cd9b1 commit 8d02b3d

File tree

2 files changed

+0
-40
lines changed

2 files changed

+0
-40
lines changed

docs/components/Footer/index.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
import { useEffect } from "react"
2-
import { useRouter } from "next/router"
32
import cx from "classnames"
43

54
function kFormatter(num: number) {
65
return (Math.sign(num) * (Math.abs(num) / 1000)).toFixed(1) + "k"
76
}
87

98
export function Footer({ className = "" }) {
10-
const router = useRouter()
11-
129
useEffect(() => {
1310
fetch("https://api.github.com/repos/nextauthjs/next-auth")
1411
.then((res) => res.json())
@@ -17,18 +14,6 @@ export function Footer({ className = "" }) {
1714
if (!githubStat) return
1815
githubStat.innerHTML = kFormatter(data.stargazers_count ?? 21100)
1916
})
20-
21-
// CarbonAds hydration error workaround hack
22-
const carbonAdsEl =
23-
document.querySelector<HTMLScriptElement>("#_carbonads_js")
24-
if (carbonAdsEl) {
25-
carbonAdsEl.src =
26-
"https://cdn.carbonads.com/carbon.js?serve=CWYD42JY&placement=authjsdev&format=cover"
27-
28-
router.events.on("routeChangeComplete", () => {
29-
window._carbonads?.refresh()
30-
})
31-
}
3217
}, [])
3318
return (
3419
<div

docs/pages/global.css

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -199,31 +199,6 @@ html[data-theme="dark"] .github-counter {
199199
animation: fadeOut 250ms ease-in;
200200
}
201201

202-
#carbonads_bak {
203-
@apply flex flex-col gap-1 rounded-md bg-neutral-100 p-3 text-xs text-neutral-500 dark:bg-neutral-800 dark:!text-neutral-400;
204-
205-
.carbon-text {
206-
@apply dark:text-neutral-300;
207-
}
208-
209-
.carbon-poweredby {
210-
@apply dark:text-neutral-400;
211-
}
212-
213-
#carbon-responsive .carbon-img {
214-
flex: unset !important;
215-
}
216-
img {
217-
@apply w-full !max-w-full rounded-[0.25rem];
218-
}
219-
220-
#carbon-responsive .carbon-responsive-wrap {
221-
border: none !important;
222-
background-color: unset !important;
223-
padding: 0 !important;
224-
}
225-
}
226-
227202
.sponsoredBadge {
228203
display: inline-block;
229204
width: max-content;

0 commit comments

Comments
 (0)