'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;
}
