Download wp-calypso/client/reader/stream/empty-search-recommended-post.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 818 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/stream/empty-search-recommended-post.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/reader/stream/empty-search-recommended-post.jsx
-
curl -L -o empty-search-recommended-post.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/stream/empty-search-recommended-post.jsx
818 Bytes
| import { useDispatch } from 'react-redux'; | |
| import { recordTrackForPost, recordAction } from 'calypso/reader/stats'; | |
| import { showSelectedPost } from 'calypso/reader/utils'; | |
| import Post from './post'; | |
| export default function EmptySearchRecommendedPost( { | |
| post, | |
| postKey, | |
| streamKey, | |
| fixedHeaderHeight, | |
| } ) { | |
| const dispatch = useDispatch(); | |
| function handlePostClick() { | |
| recordTrackForPost( 'calypso_reader_recommended_post_clicked', post, { | |
| recommendation_source: 'empty-search', | |
| } ); | |
| recordAction( 'search_page_rec_post_click' ); | |
| dispatch( | |
| showSelectedPost( { | |
| postKey: postKey, | |
| streamKey, | |
| } ) | |
| ); | |
| } | |
| if ( ! post ) { | |
| return null; | |
| } | |
| return ( | |
| <Post | |
| post={ post } | |
| handleClick={ handlePostClick } | |
| fixedHeaderHeight={ fixedHeaderHeight } | |
| streamKey={ streamKey } | |
| /> | |
| ); | |
| } | |