From 8f096b940075b6c479f67c85fd61010763fc6c39 Mon Sep 17 00:00:00 2001 From: Evandro Fonseca Junior Date: Tue, 20 Jan 2026 19:55:06 -0300 Subject: [PATCH] feat(config, layout): add analytics proxy and improve type handling - Implemented a rewrite rule in the Next.js configuration to proxy analytics requests, bypassing adblockers for Rybbit Analytics. - Enhanced the RootLayout component by correcting the typing of the children prop and improving the structure for better type safety. --- app/layout.tsx | 19 +++++++++++-------- next.config.ts | 10 ++++++++++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/app/layout.tsx b/app/layout.tsx index 13430c1..349feb6 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,6 +1,8 @@ import type { Metadata } from "next"; import { Geist, Geist_Mono } from "next/font/google"; import Script from "next/script"; +// Importação necessária para corrigir o erro de namespace e tipagem do children +import { ReactNode } from "react"; import "./globals.css"; const geistSans = Geist({ @@ -69,11 +71,12 @@ export const metadata: Metadata = { }, }; -export default function RootLayout({ - children, -}: Readonly<{ - children: React.ReactNode; -}>) { +// Interface tipada corretamente +interface RootLayoutProps { + children: ReactNode; +} + +export default function RootLayout({ children }: Readonly) { return ( @@ -87,7 +90,6 @@ export default function RootLayout({ - {/* DNS prefetch for additional performance */} @@ -126,11 +128,12 @@ export default function RootLayout({ > {children}