mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-26 17:36:12 +01:00
Add Plausible
This commit is contained in:
@@ -4,6 +4,7 @@ import { ThemeToggle } from '@/components/theme-toggle'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { env } from '@/lib/env'
|
||||
import type { Metadata, Viewport } from 'next'
|
||||
import PlausibleProvider from 'next-plausible'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import './globals.css'
|
||||
@@ -63,6 +64,9 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
{env.PLAUSIBLE_DOMAIN && (
|
||||
<PlausibleProvider domain={env.PLAUSIBLE_DOMAIN} trackOutboundLinks />
|
||||
)}
|
||||
<body className="pt-16 min-h-[100dvh] flex flex-col items-stretch">
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
|
||||
@@ -4,6 +4,7 @@ const envSchema = z.object({
|
||||
NEXT_PUBLIC_BASE_URL: z.string().url(),
|
||||
POSTGRES_URL_NON_POOLING: z.string().url(),
|
||||
POSTGRES_PRISMA_URL: z.string().url(),
|
||||
PLAUSIBLE_DOMAIN: z.string().optional(),
|
||||
})
|
||||
|
||||
export const env = envSchema.parse(process.env)
|
||||
|
||||
Reference in New Issue
Block a user