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