feat : dev on prod
CI / Build immutable images and deploy (push) Successful in 1m52s

This commit is contained in:
2026-09-16 20:19:27 +07:00 Unverified
parent 2799103dd0
commit 910afdeb71
11 changed files with 87 additions and 4 deletions
+30
View File
@@ -0,0 +1,30 @@
"use client";
import Script from "next/script";
import { authClient } from "@/lib/auth/client";
const clientId = process.env.NEXT_PUBLIC_GOOGLE_ADSENSE_CLIENT_ID?.trim();
export function GoogleAdsense() {
const { data: session, error, isPending } = authClient.useSession();
if (
process.env.NODE_ENV !== "production" ||
!clientId ||
isPending ||
error ||
session
) {
return null;
}
return (
<Script
id="google-adsense"
src={`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${encodeURIComponent(clientId)}`}
strategy="afterInteractive"
crossOrigin="anonymous"
/>
);
}