Update src/components/ServiceWrapper.tsx

This commit is contained in:
2026-02-27 12:35:18 +00:00
parent 8d00d140e4
commit f2504e6196

View File

@@ -1,22 +1,15 @@
'use client';
import Script from 'next/script';
import React, { ReactNode } from 'react';
export function ServiceWrapper({ children }: { children: React.ReactNode }) {
const websiteId = process.env.NEXT_PUBLIC_WEBSITE_ANALYTICS_ID;
interface ServiceWrapperProps {
children: ReactNode;
}
export function ServiceWrapper({ children }: ServiceWrapperProps) {
return (
<>
{websiteId && (
<Script
async
defer
data-website-id={websiteId}
src="https://analytics.webild.io/script.js"
strategy="afterInteractive"
/>
)}
<div className="min-h-screen w-full bg-gradient-to-br from-slate-50 to-slate-100">
{children}
</>
</div>
);
}