Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified

Query Jetpack Credentials Status

<QueryJetpackCredentialsStatus /> is a React component that dispatches actions for testing Jetpack Credentials to determine whether they are still valid.

Usage

Render the component, passing siteId and role. It does not accept any children, nor does it render any elements to the page. You can use it adjacent to other sibling components which make use of the fetched data made available through the global application state.

import QueryJetpackCredentialsStatus from 'calypso/components/data/query-jetpack-credentials-status';

export default function MyComponent( { siteId, role } ) {
    return (
        <>
            <QueryJetpackCredentialsStatus siteId={ siteId } role={ role } />
        </>
    );
}

Props

siteId

TypeNumber
RequiredYes

The site ID for which Jetpack Credentials status should be requested.

role

TypeString
RequiredYes

The credentials role we want to test. For example: "main", "alternate".