Skip to content

Commit

Permalink
fix: posthog eslint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhesham6 committed Jun 11, 2024
1 parent 49789e7 commit 012ce2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/lib/posthog/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { usePathname, useSearchParams } from 'next/navigation';
import { useEffect } from 'react';
import { usePostHog } from 'posthog-js/react';
import { type PostHog, usePostHog } from 'posthog-js/react';

/**
* This component is used to capture page views in PostHog.
Expand All @@ -11,7 +11,7 @@ import { usePostHog } from 'posthog-js/react';
export default function PostHogPageView(): null {
const pathname = usePathname();
const searchParams = useSearchParams();
const posthog = usePostHog();
const posthog = usePostHog() as PostHog | undefined;

useEffect(() => {
if (pathname && posthog) {
Expand Down

0 comments on commit 012ce2e

Please sign in to comment.