forked from Automattic/wp-calypso
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data Stores: Refactor partner portal credit card store to `createRedu…
…xStore()` - take 2 (Automattic#75377) * Revert "Revert "Data Stores: Refactor partner portal credit card store to createReduxStore() (Automattic#74656)" (Automattic#75371)" This reverts commit 41abfc9. * Access store directly, rely on type inference * Remove unnecessary mocks to fix tests
- Loading branch information
Showing
9 changed files
with
70 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import { registerStore } from '@wordpress/data'; | ||
import { createReduxStore, register } from '@wordpress/data'; | ||
import * as actions from 'calypso/state/partner-portal/credit-card-form/actions'; | ||
import reducer from 'calypso/state/partner-portal/credit-card-form/reducer'; | ||
import * as selectors from 'calypso/state/partner-portal/credit-card-form/selectors'; | ||
|
||
export function createStoredCreditCardPaymentMethodStore(): Record< string, unknown > { | ||
const store = registerStore( 'credit-card', { | ||
reducer, | ||
actions, | ||
selectors, | ||
} ); | ||
export const creditCardStore = createReduxStore( 'credit-card', { | ||
reducer, | ||
actions, | ||
selectors, | ||
} ); | ||
|
||
return { ...store, actions, selectors }; | ||
} | ||
register( creditCardStore ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters