Download wp-calypso/client/data/geo/with-geolocation.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 335 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/geo/with-geolocation.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/data/geo/with-geolocation.jsx
-
curl -L -o with-geolocation.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/data/geo/with-geolocation.jsx
335 Bytes
| import { createHigherOrderComponent } from '@wordpress/compose'; | |
| import { useGeoLocationQuery } from './use-geolocation-query'; | |
| export const withGeoLocation = createHigherOrderComponent( | |
| ( Wrapped ) => ( props ) => { | |
| const { data } = useGeoLocationQuery(); | |
| return <Wrapped { ...props } geo={ data } />; | |
| }, | |
| 'withGeoLocation' | |
| ); | |