Download wp-calypso/client/lib/jetpack/contact-support-url.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 848 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/jetpack/contact-support-url.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/lib/jetpack/contact-support-url.js
-
curl -L -o contact-support-url.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/lib/jetpack/contact-support-url.js
848 Bytes
| import { localizeUrl } from '@automattic/i18n-utils'; | |
| import { JETPACK_CONTACT_SUPPORT } from '@automattic/urls'; | |
| import { addQueryArgs } from 'calypso/lib/url'; | |
| /** | |
| * Creates a URL that refers to the Jetpack 'Contact Support' page, | |
| * with accompanying useful information about the reason for the | |
| * support request. | |
| * @param {string?} [siteUrl] A site URL | |
| * @param {string?} [scanState] The current state of Jetpack Scan/Backup | |
| * @returns {string} The support request URL | |
| */ | |
| export default function contactSupportUrl( siteUrl, scanState ) { | |
| // NOTE: This is an extremely simple, early implementation; | |
| // if we add more options in the future, we'll want | |
| // to come back and change how we build this query string | |
| return addQueryArgs( | |
| { | |
| url: siteUrl, | |
| 'scan-state': scanState, | |
| }, | |
| localizeUrl( JETPACK_CONTACT_SUPPORT ) | |
| ); | |
| } | |