From 60a50090a1cff9e4560f00e8848ddf251d92599b Mon Sep 17 00:00:00 2001 From: hjy0951 Date: Fri, 13 Sep 2024 21:08:08 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EB=B6=84=EC=84=9D=20=ED=88=B4?= =?UTF-8?q?=EC=9D=B8=20clarity=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/analyzers/clarity.tsx | 17 +++++++++++++++++ app/analyzers/index.ts | 1 + app/layout.tsx | 4 ++++ 3 files changed, 22 insertions(+) create mode 100644 app/analyzers/clarity.tsx create mode 100644 app/analyzers/index.ts diff --git a/app/analyzers/clarity.tsx b/app/analyzers/clarity.tsx new file mode 100644 index 00000000..1fba797b --- /dev/null +++ b/app/analyzers/clarity.tsx @@ -0,0 +1,17 @@ +import Script from 'next/script'; + +export const Clarity = () => { + if (process.env.NODE_ENV !== 'production') return null; + + return ( + + ); +}; diff --git a/app/analyzers/index.ts b/app/analyzers/index.ts new file mode 100644 index 00000000..5b96b769 --- /dev/null +++ b/app/analyzers/index.ts @@ -0,0 +1 @@ +export * from './clarity'; diff --git a/app/layout.tsx b/app/layout.tsx index 5a564d0a..601841ff 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -9,6 +9,7 @@ import MetaTagImage from '@/public/images/meta-tag.png'; import { css } from '@/styled-system/css'; import { pretendard } from '@/styles/font'; +import { Clarity } from './analyzers'; import ReactQueryProvider from './providers/ReactQueryProvider'; export const metadata: Metadata = { @@ -62,6 +63,9 @@ export default function RootLayout({ }>) { return ( + + +