Skip to content

Commit

Permalink
Revert "JITMs: add redux structure and REST API client method to be u…
Browse files Browse the repository at this point in the history
…sed by the JITM component of the Jetpack Dashboard (Spin-off of #10759). (#10818)"

This reverts commit dabff02.
We will take a different approach, outlined in #10889
  • Loading branch information
jeherve committed Dec 7, 2018
1 parent fb9f1a4 commit 4ece278
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 287 deletions.
24 changes: 2 additions & 22 deletions _inc/client/rest-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require( 'es6-promise' ).polyfill();
import 'whatwg-fetch';
import assign from 'lodash/assign';
import head from 'lodash/head';

/**
* Helps create new custom error classes to better notify upper layers.
Expand Down Expand Up @@ -267,27 +266,8 @@ function JetpackRestApiClient( root, nonce ) {
verifySiteGoogle: ( keyringId ) => postRequest( `${ apiRoot }jetpack/v4/verify-site/google`, postParams, {
body: JSON.stringify( { keyring_id: keyringId } ),
} )
.then( checkStatus )
.then( parseJsonResponse ),

fetchJitm: ( message_path, query_url ) => {
const requestUrl = `${ apiRoot }jetpack/v4/jitm?message_path=${ encodeURIComponent( message_path ) }&query=${ encodeURIComponent( query_url ) }`;

return getRequest( requestUrl, getParams )
.then( checkStatus )
.then( parseJsonResponse )
.then( messages => ( head( messages ) ) );
},

dismissJitm: ( id, feature_class ) => postRequest(
`${ apiRoot }jetpack/v4/jitm`,
postParams,
{
body: JSON.stringify( { id, feature_class } )
}
)
.then( checkStatus )
.then( parseJsonResponse )
.then( checkStatus )
.then( parseJsonResponse )
};

function addCacheBuster( route ) {
Expand Down
7 changes: 0 additions & 7 deletions _inc/client/state/action-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,3 @@ export const JETPACK_SITE_VERIFY_GOOGLE_VERIFY_FETCH_SUCCESS = 'JETPACK_SITE_VER
export const JETPACK_SITE_VERIFY_GOOGLE_REQUEST = 'JETPACK_SITE_VERIFY_GOOGLE_REQUEST';
export const JETPACK_SITE_VERIFY_GOOGLE_REQUEST_SUCCESS = 'JETPACK_SITE_VERIFY_GOOGLE_REQUEST_SUCCESS';
export const JETPACK_SITE_VERIFY_GOOGLE_REQUEST_FAIL = 'JETPACK_SITE_VERIFY_GOOGLE_REQUEST_FAIL';

export const JITM_FETCH = 'JITM_FETCH';
export const JITM_FETCH_RECEIVE = 'JITM_FETCH_RECEIVE';
export const JITM_FETCH_FAIL = 'JITM_FETCH_FAIL';
export const JITM_DISMISS = 'JITM_DISMISS';
export const JITM_DISMISS_SUCCESS = 'JITM_DISMISS_SUCCESS';
export const JITM_DISMISS_FAIL = 'JITM_DISMISS_FAIL';
56 changes: 0 additions & 56 deletions _inc/client/state/jitm/actions.js

This file was deleted.

9 changes: 0 additions & 9 deletions _inc/client/state/jitm/index.js

This file was deleted.

102 changes: 0 additions & 102 deletions _inc/client/state/jitm/reducer.js

This file was deleted.

50 changes: 0 additions & 50 deletions _inc/client/state/jitm/test/reducer.js

This file was deleted.

38 changes: 0 additions & 38 deletions _inc/client/state/jitm/test/selectors.js

This file was deleted.

4 changes: 1 addition & 3 deletions _inc/client/state/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { reducer as search } from 'state/search/reducer';
import { reducer as devCard } from 'state/dev-version/reducer';
import { reducer as publicize } from 'state/publicize/reducer';
import { reducer as siteVerify } from 'state/site-verify/reducer';
import { reducer as jitm } from 'state/jitm/reducer';

const jetpackReducer = combineReducers( {
initialState,
Expand All @@ -40,8 +39,7 @@ const jetpackReducer = combineReducers( {
search,
devCard,
publicize,
siteVerify,
jitm,
siteVerify
} );

export default combineReducers( {
Expand Down

0 comments on commit 4ece278

Please sign in to comment.