From dfc67ccb7faad79e18de7fad2b2502bdbd82d4c1 Mon Sep 17 00:00:00 2001 From: meetqy Date: Mon, 25 Mar 2024 20:06:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A6=82=E6=9E=9C=E6=9C=AA=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E7=BB=9F=E8=AE=A1=E7=9A=84=E7=8E=AF=E5=A2=83=E5=8F=98?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E5=88=99=E4=B8=8D=E5=8A=A0=E8=BD=BD=E7=9B=B8?= =?UTF-8?q?=E5=BA=94=E7=9A=84=E4=BB=A3=E7=A0=81=20#65?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/metrics/google-analytics.tsx | 4 +++- src/app/metrics/microsoft-clarity.tsx | 4 +++- src/app/root.tsx | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/metrics/google-analytics.tsx b/src/app/metrics/google-analytics.tsx index 7de68c96..8b2f847d 100644 --- a/src/app/metrics/google-analytics.tsx +++ b/src/app/metrics/google-analytics.tsx @@ -2,7 +2,9 @@ import Script from "next/script"; -const GoogleAnalytics = ({ id }: { id: string }) => { +const GoogleAnalytics = ({ id }: { id?: string }) => { + if (!id) return null; + return ( <>