mirror of
https://github.com/kremalicious/asi-calculator.git
synced 2024-12-22 09:23:16 +01:00
analytics only in production
This commit is contained in:
parent
979e2361fb
commit
183e92af7d
@ -2,7 +2,7 @@ import type { Metadata } from 'next'
|
|||||||
import '@/styles/globals.css'
|
import '@/styles/globals.css'
|
||||||
import '@/styles/loading-ui.css'
|
import '@/styles/loading-ui.css'
|
||||||
import Script from 'next/script'
|
import Script from 'next/script'
|
||||||
import { title, description, font, liveUrl } from '@/constants'
|
import { title, description, font, liveUrl, isProduction } from '@/constants'
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title,
|
title,
|
||||||
@ -19,11 +19,13 @@ export default function RootLayout({
|
|||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<Script
|
{isProduction ? (
|
||||||
async
|
<Script
|
||||||
src="https://a.kretschmann.io/script.js"
|
async
|
||||||
data-website-id="6565eff1-a1c8-4b3e-a6c4-08ecb00b06ab"
|
src="https://a.kretschmann.io/script.js"
|
||||||
/>
|
data-website-id="6565eff1-a1c8-4b3e-a6c4-08ecb00b06ab"
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
</head>
|
</head>
|
||||||
<body className={font.variable}>{children}</body>
|
<body className={font.variable}>{children}</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -21,3 +21,5 @@ export const font = Hanken_Grotesk({
|
|||||||
subsets: ['latin'],
|
subsets: ['latin'],
|
||||||
variable: '--font-hanken-grotesk'
|
variable: '--font-hanken-grotesk'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export const isProduction = process.env.NODE_ENV === 'production'
|
||||||
|
Loading…
Reference in New Issue
Block a user