diff --git a/src/features/liveEvents/components/LiveEventFeedCardWide.tsx b/src/features/liveEvents/components/LiveEventFeedCardWide.tsx index 21af557379..9eecf475ee 100644 --- a/src/features/liveEvents/components/LiveEventFeedCardWide.tsx +++ b/src/features/liveEvents/components/LiveEventFeedCardWide.tsx @@ -1,10 +1,11 @@ -import {useEffect, useMemo} from 'react' +import {useMemo} from 'react' import {View} from 'react-native' import {Image} from 'expo-image' import {LinearGradient} from 'expo-linear-gradient' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import {useCallOnce} from '#/lib/once' import {isBskyCustomFeedUrl} from '#/lib/strings/url-helpers' import {atoms as a, useBreakpoints, utils} from '#/alf' import {Link} from '#/components/Link' @@ -39,14 +40,12 @@ export function LiveEventFeedCardWide({ return '/' }, [feed.url]) - // TODO double check this - useEffect(() => { + useCallOnce(() => { ax.metric('liveEvents:feedBanner:seen', { feed: feed.url, context: metricContext, }) - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) + })() return (