diff --git a/src/app/invoice-form.tsx b/src/app/invoice-form.tsx index 7479c88..17f399b 100644 --- a/src/app/invoice-form.tsx +++ b/src/app/invoice-form.tsx @@ -48,7 +48,7 @@ export function InvoiceForm() { const onSubmit: SubmitHandler = async (data) => { setIsGenerating(true); // Plausible event tracking - if (typeof window.plausible !== 'undefined' && process.env.NODE_ENV === 'production' && process.env.CI !== 'true') { + if (typeof window.plausible !== 'undefined') { window.plausible('Invoice_Generated', { callback: () => { console.log('Plausible event sent: Invoice_Generated'); diff --git a/src/app/layout.tsx b/src/app/layout.tsx index e706544..1820741 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,6 +4,7 @@ import { Metadata, Viewport } from 'next'; import Script from 'next/script'; import { Header } from '@/components/header'; +import { isProd } from '@/utils/isProd'; export const viewport: Viewport = { themeColor: '#f4f4f5', @@ -62,7 +63,7 @@ export default function RootLayout({ children }: { children: React.ReactNode }) {children} - {process.env.NODE_ENV === 'production' && process.env.VERCEL_ENV === 'production' && ( + {isProd && ( <>