Skip to content

Commit

Permalink
Enhance tracks
Browse files Browse the repository at this point in the history
  • Loading branch information
alshakero committed Jun 20, 2024
1 parent 1d817a9 commit ce5d2d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/help-center/src/components/help-center.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/**
* External Dependencies
*/
import { initializeAnalytics } from '@automattic/calypso-analytics';
import { useSelect, useDispatch } from '@wordpress/data';
import { createPortal, useEffect, useRef } from '@wordpress/element';
/**
Expand Down Expand Up @@ -86,7 +87,13 @@ const HelpCenter: React.FC< Container > = ( {
};
}, [] );
const { setSite } = useDispatch( HELP_CENTER_STORE );
const { selectedSiteId, primarySiteId } = useHelpCenterContext();
const { selectedSiteId, primarySiteId, currentUserId } = useHelpCenterContext();

useEffect( () => {
if ( currentUserId ) {
initializeAnalytics( { ID: currentUserId }, null );
}
}, [ currentUserId ] );

useSelect( ( select ) => ( select( USER_STORE ) as UserSelect ).getCurrentUser(), [] );

Expand Down

0 comments on commit ce5d2d9

Please sign in to comment.