From 9d74cceb693184fe3a2068d1db62bc167d70052d Mon Sep 17 00:00:00 2001 From: Ege Can Komur Date: Wed, 20 May 2026 18:49:15 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20ConsentInit'i=20'den=20'e=20?= =?UTF-8?q?ta=C5=9F=C4=B1=20(Next.js=2016=20uyumu)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hata: > Encountered a script tag while rendering React component. > Scripts inside React components are never executed when rendering on the client. Sebep: Next.js 16 React 19'da next/script'i içine koyamıyoruz. Script'ler body içinde render edilmeli — Next.js zaten doğru yere yerleştiriyor. Çözüm: ConsentInit'i app/layout.tsx içinde 'den çıkardık, body'nin ilk elementi olarak koyduk. beforeInteractive strategy hala çalışıyor (Next.js doğru sırayı yönetiyor). --- app/layout.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index 634f4a9..9bcc498 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -50,10 +50,8 @@ export default async function RootLayout({ lang="tr" className={`${poppins.variable} ${geistMono.variable} h-full antialiased`} > - - - + {children}