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