Some checks failed
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🔍 Prepare (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
21 lines
425 B
TypeScript
21 lines
425 B
TypeScript
'use client';
|
|
|
|
import { useEffect } from 'react';
|
|
import { useAnalytics } from './useAnalytics';
|
|
import { AnalyticsEvents } from './analytics-events';
|
|
|
|
export default function ClientNotFoundTracker({ path }: { path: string }) {
|
|
const { trackEvent } = useAnalytics();
|
|
|
|
useEffect(() => {
|
|
trackEvent(AnalyticsEvents.ERROR, {
|
|
type: '404_not_found',
|
|
path,
|
|
});
|
|
|
|
|
|
}, [trackEvent, path]);
|
|
|
|
return null;
|
|
}
|