Download wp-calypso/client/me/developer/features/use-handle-click-link.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 611 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/me/developer/features/use-handle-click-link.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/me/developer/features/use-handle-click-link.tsx
-
curl -L -o use-handle-click-link.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/me/developer/features/use-handle-click-link.tsx
611 Bytes
| import { useCallback } from 'react'; | |
| import { useRecordTracksEventWithUserIsDevAccount } from './use-record-tracks-event-with-user-is-dev-account'; | |
| export const useHandleClickLink = () => { | |
| const recordTracksEventWithUserIsDevAccount = useRecordTracksEventWithUserIsDevAccount(); | |
| return useCallback( | |
| ( event: React.MouseEvent< HTMLAnchorElement > ) => { | |
| const feature = event.currentTarget.id ? event.currentTarget.id : event.currentTarget.href; | |
| recordTracksEventWithUserIsDevAccount( 'calypso_me_developer_learn_more', { | |
| feature, | |
| } ); | |
| }, | |
| [ recordTracksEventWithUserIsDevAccount ] | |
| ); | |
| }; | |