Skip to content

Commit

Permalink
my-jetpack: restore redirectUri prop to connection component
Browse files Browse the repository at this point in the history
  • Loading branch information
retrofox committed Jan 28, 2022
1 parent 9ba4e01 commit 6f2dabc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/* global myJetpackRest */
/**
* External dependencies
*/
import React from 'react';
import { ConnectionStatusCard } from '@automattic/jetpack-connection';
import useMyJetpackConnection from '../../hooks/use-my-jetpack-connection';

/**
* Plan section component.
*
* @returns {object} ConnectionsSection React component.
*/
export default function ConnectionsSection() {
const { apiRoot, apiNonce, redirectUrl } = useMyJetpackConnection();
return (
<ConnectionStatusCard apiRoot={ myJetpackRest.apiRoot } apiNonce={ myJetpackRest.apiNonce } />
<ConnectionStatusCard apiRoot={ apiRoot } apiNonce={ apiNonce } redirectUri={ redirectUrl } />
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export default function useMyJetpackConnection( options = { redirect: false } )
}, [ isSiteConnected, redirect, topJetpackMenuItemUrl ] );

return {
apiNonce,
apiRoot,
...connectionData,
isSiteConnected,
redirectUrl: topJetpackMenuItemUrl,
Expand Down

0 comments on commit 6f2dabc

Please sign in to comment.