|
Download wp-calypso/client/components/data/query-intro-offers/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 954 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-intro-offers/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/data/query-intro-offers/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/data/query-intro-offers/README.md
954 Bytes
| # Query Intro Offers | |
| `<QueryIntroOffers />` is a React component used in managing network requests product introductory offers. | |
| ## Usage | |
| Render the component, passing in the properties below. It does not accept any children, nor does it render any elements to the page. | |
| ```tsx | |
| /* eslint-disable */ | |
| import QueryIntroOffers from 'calypso/components/data/query-intro-offers'; | |
| import getIntroOfferPrice from 'calypso/state/selectors/get-intro-offer-price'; | |
| const listProductPrice: React.FC = ( { siteId, productId, productPrice } ) => { | |
| const introOfferPrice = useSelector( ( state ) => | |
| getIntroOfferPrice( state, productId, siteId ) | |
| ); | |
| return ( | |
| <div> | |
| <QueryIntroOffers siteId={ siteId } /> | |
| <span>{ introOfferPrice ?? productPrice }</span> | |
| </div> | |
| ); | |
| }; | |
| ``` | |
| ## Props | |
| ### `siteId` | |
| <table> | |
| <tr><th>Type</th><td>Number</td></tr> | |
| <tr><th>Required</th><td>Yes</td></tr> | |
| </table> | |
| The ID of the site to fetch the introductory offers for. | |