Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import Footer from '../components/footer';
import GlobalModal from '@/components/modal/globalModal';
import QueryProvider from '@/components/providers/queryProvider';
import { GoogleAnalytics } from '@next/third-parties/google';
import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';

Check warning on line 9 in app/layout.tsx

View workflow job for this annotation

GitHub Actions / build

'GoogleAnalytics' is defined but never used
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n app/layout.tsx

Repository: SWYP-mingling/Frontend

Length of output: 2555


🏁 Script executed:

rg -n '\bGoogleAnalytics\b' app/layout.tsx

Repository: SWYP-mingling/Frontend

Length of output: 147


사용하지 않는 GoogleAnalytics import를 제거해주세요.

Line 9에서 GoogleAnalytics를 import했지만 파일에서 사용되지 않습니다. GoogleTagManager만 필요하므로 import를 정정하면 됩니다.

-import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
+import { GoogleTagManager } from '@next/third-parties/google';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
import { GoogleTagManager } from '@next/third-parties/google';
🧰 Tools
🪛 GitHub Check: build

[warning] 9-9:
'GoogleAnalytics' is defined but never used

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/layout.tsx` at line 9, 현재 app/layout.tsx에서 import 구문에 사용되지 않는 심볼
GoogleAnalytics가 포함되어 있습니다; import 문에서 GoogleAnalytics를 제거하고 GoogleTagManager만
남기도록 수정하세요 (즉, import { GoogleTagManager } from '@next/third-parties/google';로
정리), 변경 후 빌드나 lint 에러가 없는지 확인하세요.


const pretendard = localFont({
src: [
Expand Down Expand Up @@ -38,6 +38,7 @@
}>) {
return (
<html lang="ko" className={pretendard.variable}>
<GoogleTagManager gtmId="GTM-MSQ45TJD" />
<body className="flex min-h-screen flex-col">
<QueryProvider>
<Header />
Expand All @@ -50,7 +51,6 @@
strategy="beforeInteractive"
/>
</body>
<GoogleAnalytics gaId="G-3FN93H79SZ" />
</html>
);
}
Loading