Skip to content

Commit

Permalink
fix: ga
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Nov 15, 2024
1 parent f08e11e commit f86bc05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BUILD_SERVER_BASE_URL=https://playground.test.aelf.dev
SOLANG_BUILD_SERVER_BASE_URL=https://playground-next.test.aelf.dev
SOLIDITY_ENABLED=false
GA_TAG=
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
GITHUB_API_KEY=
NEXT_PUBLIC_FAUCET_API_URL=
NEXT_PUBLIC_GOOGLE_CAPTCHA_SITEKEY=
Expand Down
5 changes: 2 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import { PropsWithChildren, Suspense } from "react";
import TopMenu from "@/components/top-menu";
import clsx from "clsx";
import { GoogleAnalytics } from "@next/third-parties/google";
import { getGoogleAnalyticsTag } from "@/lib/env";
import Providers from "@/components/providers";
import { Toaster } from "@/components/ui/toaster";
import { PublicEnvScript } from 'next-runtime-env';
import { env, PublicEnvScript } from 'next-runtime-env';

const font = Poppins({
weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
Expand All @@ -22,7 +21,7 @@ export const metadata: Metadata = {
};

export default function RootLayout({ children }: PropsWithChildren) {
const gaId = getGoogleAnalyticsTag();
const gaId = env("NEXT_PUBLIC_GOOGLE_ANALYTICS_ID");

return (
<html lang="en">
Expand Down
4 changes: 0 additions & 4 deletions lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ export function getSolangBuildServerBaseUrl() {
return getEnv("SOLANG_BUILD_SERVER_BASE_URL");
}

export function getGoogleAnalyticsTag() {
return getEnv("GA_TAG");
}

export function getGitHubToken() {
return getEnv("GITHUB_API_KEY");
}
Expand Down

0 comments on commit f86bc05

Please sign in to comment.