Skip to content

Commit

Permalink
feat: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
CarinaDraganJW committed May 23, 2023
1 parent dfd2f5c commit 39ef065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useOttAnalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ const useOttAnalytics = (item?: PlaylistItem, feedId: string = '') => {
const analyticsToken = useConfigStore((s) => s.config.analyticsToken);
const user = useAccountStore((state) => state.user);

// oaid (Ott App User ID) for analytics
const userId = Number(user?.id);
const isLoggedIn = !!userId;
const oaid: number | undefined = isLoggedIn ? userId : undefined;

const [player, setPlayer] = useState<jwplayer.JWPlayer | null>(null);

const oaid: number | undefined = isLoggedIn ? userId : undefined;

const timeHandler = useCallback(({ position, duration }: jwplayer.TimeParam) => {
window.jwpltx.time(position, duration);
}, []);
Expand Down

0 comments on commit 39ef065

Please sign in to comment.