Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
seondal committed Nov 6, 2023
2 parents b74e2e1 + 15319a0 commit 20197fd
Show file tree
Hide file tree
Showing 7 changed files with 2,331 additions and 40 deletions.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_NODE_ENV=development
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_NODE_ENV=production
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"next": "13.4.12",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hotjar": "^6.1.0",
"react-intersection-observer": "^9.5.2",
"react-lottie-player": "^1.5.4",
"react-tooltip": "^5.20.0",
Expand Down
7 changes: 6 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import { Suspense } from 'react';

import { Analytics } from '@/components/Analytics';
import { OverlayProvider } from '@/components/Overlay/OverlayProvider';
import { BASE_SITE_URL } from '@/constants';
import { BASE_SITE_URL, HOTJAR } from '@/constants';
import QueryProvider from '@/provider/QueryProvider';
import RecoilContextProvider from '@/provider/RecoilContextProvider';

import type { Metadata } from 'next';
import { META_STRING } from '@/constants/meta';
import { hotjar } from 'react-hotjar';

export const metadata: Metadata = {
metadataBase: new URL(BASE_SITE_URL),
Expand Down Expand Up @@ -52,6 +53,10 @@ export const metadata: Metadata = {
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
if (process.env.NODE_ENV !== 'development') {
hotjar.initialize(HOTJAR.HJID, HOTJAR.HJSV);
}

return (
<html lang="ko">
<body className="flex min-h-[100dvh] w-screen touch-none justify-center bg-slate-100 py-px">
Expand Down
1 change: 1 addition & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export const BASE_API_URL = process.env.NEXT_PUBLIC_API_URL;
export const BASE_SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://www.posepicker.site';
export const KAKAO_KEY = process.env.NEXT_PUBLIC_KAKAO_KEY;
export const GA_ID = process.env.NEXT_PUBLIC_GA_ID;
export const HOTJAR = { HJID: 3704547, HJSV: 6 };
2,355 changes: 2,316 additions & 39 deletions yarn-error.log

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4201,6 +4201,11 @@ react-dom@18.2.0:
loose-envify "^1.1.0"
scheduler "^0.23.0"

react-hotjar@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/react-hotjar/-/react-hotjar-6.1.0.tgz#910dd5d002f5043a6f34ae7ada545b2aace1edae"
integrity sha512-V1UJixDMspAIrbGIFG282U7mH2aK1JBid0YR8F9oscb6lTkjMga+gst2gesxJDsqsax+k+lM1LqRXYzmUu8izA==

react-intersection-observer@^9.5.2:
version "9.5.2"
resolved "https://registry.yarnpkg.com/react-intersection-observer/-/react-intersection-observer-9.5.2.tgz#f68363a1ff292323c0808201b58134307a1626d0"
Expand Down

0 comments on commit 20197fd

Please sign in to comment.