Skip to content

Commit 5165d4f

Browse files
committed
fix errors
1 parent fd0615f commit 5165d4f

File tree

5 files changed

+101
-98
lines changed

5 files changed

+101
-98
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Suggested keys:
3131
- `NEXT_PUBLIC_SITE_URL`
3232
- `WAKATIME_API_KEY` (optional)
3333
- `NEXT_PUBLIC_WEB3FORMS_ACCESS_KEY` (contact form)
34-
- `NEXT_PUBLIC_GTM_ID` and `NEXT_PUBLIC_GA_ID` (optional analytics)
34+
- `NEXT_PUBLIC_GTM_ID` and `NEXT_PUBLIC_GA_ID` (optional overrides, defaults are already configured)
3535

3636
### 3. Run development server
3737

bun.lock

Lines changed: 93 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import "./.next/dev/types/routes.d.ts";
3+
import "./.next/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"react-dropzone": "^15.0.0",
7474
"react-hook-form": "^7.71.2",
7575
"react-icons": "^5.6.0",
76-
"react-resizable-panels": "^4.7.2",
76+
"react-resizable-panels": "^4.7.3",
7777
"react-syntax-highlighter": "^16.1.1",
7878
"react-tweet": "^3.3.0",
7979
"recharts": "^3.8.0",

src/app/layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ export const metadata: Metadata = {
9898
},
9999
};
100100

101+
const DEFAULT_GTM_ID = "GTM-5BQ5RPW2";
102+
const DEFAULT_GA_ID = "G-SDJ0K1Y70X";
103+
101104
function serializeJsonLd(value: unknown): string {
102105
return JSON.stringify(value).replace(/</g, "\\u003c");
103106
}
@@ -107,8 +110,8 @@ export default function RootLayout({
107110
}: Readonly<{
108111
children: React.ReactNode;
109112
}>) {
110-
const gtmId = process.env.NEXT_PUBLIC_GTM_ID;
111-
const gaId = process.env.NEXT_PUBLIC_GA_ID;
113+
const gtmId = process.env.NEXT_PUBLIC_GTM_ID || DEFAULT_GTM_ID;
114+
const gaId = process.env.NEXT_PUBLIC_GA_ID || DEFAULT_GA_ID;
112115
const shouldLoadAnalytics = process.env.NODE_ENV === "production";
113116

114117
const personJsonLd = {

0 commit comments

Comments
 (0)