Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JITMs: revert redux changes for new JITM component #10890

Merged
merged 1 commit into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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