Skip to content

Commit

Permalink
Merge pull request #4571 from luke-h1/dev
Browse files Browse the repository at this point in the history
merge dev into main
  • Loading branch information
luke-h1 authored Nov 17, 2024
2 parents a1a0d06 + 14f2256 commit 81ac6e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
21 changes: 3 additions & 18 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import SkipLink from '@frontend/components/SkipLink';
import siteConfig from '@frontend/config/site';
import getPolicies from '@frontend/utils/getPolicies';
// import newrelic from 'newrelic';
import { GoogleAnalytics } from '@next/third-parties/google';
import { Metadata } from 'next';
import Script from 'next/script';
import { ReactNode } from 'react';
import '@frontend/styles/prism.css';

Expand Down Expand Up @@ -72,6 +72,7 @@ const RootLayout = async ({ children }: Props) => {
// hasToRemoveScriptWrapper: true,
// allowTransactionlessInjection: true,
// });

return (
<html lang="en">
<head>
Expand All @@ -96,23 +97,7 @@ const RootLayout = async ({ children }: Props) => {
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
{process.env.NEXT_PUBLIC_URL === 'https://lhowsam.com' && (
<>
{/* <GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GA_TRACKING_ID} /> */}
<Script
async
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_TRACKING_ID}`}
/>

<Script id="google-analytics">
{`
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${process.env.NEXT_PUBLIC_GA_TRACKING_ID}');
`}
</Script>
</>
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GA_TRACKING_ID} />
)}
{/* <Script
id="nr-browser-agent"
Expand Down
4 changes: 3 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import Page from '@frontend/components/Page';
import PostItem from '@frontend/components/PostItem';
import Spacer from '@frontend/components/Spacer';
import Text from '@frontend/components/Text';
import WorkItem from '@frontend/components/WorkItem';
import siteConfig from '@frontend/config/site';
import postService from '@frontend/services/postService';
import workService from '@frontend/services/workService';
import { nrLogger } from '@frontend/utils/nrLogger';
import { Metadata } from 'next';
import dynamic from 'next/dynamic';

const WorkItem = dynamic(() => import('@frontend/components/WorkItem'));

export const revalidate = siteConfig.defaultRevalidate;

Expand Down

0 comments on commit 81ac6e6

Please sign in to comment.