mirror of
https://github.com/jlengrand/adyen-web-demo.git
synced 2026-03-10 08:01:24 +00:00
updated typings, refactored exports
This commit is contained in:
@@ -1,2 +1 @@
|
||||
export { updateUserInfo, clearUserInfo } from './reducers/user';
|
||||
export { updateConfigurationInfo, clearConfigurationInfo } from './reducers/configuration';
|
||||
export { userActions, configurationActions } from './reducers';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as actions from './actions';
|
||||
import * as selectors from './selectors';
|
||||
import reducers from './reducers';
|
||||
export * as actions from './actions';
|
||||
export * as selectors from './selectors';
|
||||
export { userReducer, configurationReducer } from './reducers';
|
||||
|
||||
export { actions, selectors, reducers };
|
||||
export type { ConfigurationState, UserState } from './types';
|
||||
|
||||
@@ -23,6 +23,4 @@ export const configurationSlice = createSlice({
|
||||
}
|
||||
});
|
||||
|
||||
export const { updateConfigurationInfo, clearConfigurationInfo } = configurationSlice.actions;
|
||||
|
||||
export default configurationSlice.reducer;
|
||||
export const { actions, reducer } = configurationSlice;
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
import userReducer from './user';
|
||||
import configurationReducer from './configuration';
|
||||
|
||||
export default { userReducer, configurationReducer };
|
||||
export { reducer as userReducer, actions as userActions } from './user';
|
||||
export { reducer as configurationReducer, actions as configurationActions } from './configuration';
|
||||
|
||||
@@ -20,6 +20,4 @@ export const userSlice = createSlice({
|
||||
}
|
||||
});
|
||||
|
||||
export const { updateUserInfo, clearUserInfo } = userSlice.actions;
|
||||
|
||||
export default userSlice.reducer;
|
||||
export const { actions, reducer } = userSlice;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
|
||||
import { useCheckout } from './checkout/useCheckout';
|
||||
import { useInitializeCheckout } from './checkout/useInitializeCheckout';
|
||||
import type { RootState, AppDispatch } from '../store';
|
||||
|
||||
const useAppDispatch = () => useDispatch<AppDispatch>();
|
||||
const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
||||
export type { InitializationRequest, EditableCheckoutConfigFields, CheckoutConfig, PaymentAmount, PaymentMethodsResponseInterface } from './types';
|
||||
|
||||
export { useCheckout, useInitializeCheckout, useAppDispatch, useAppSelector };
|
||||
export { useCheckout } from './checkout/useCheckout';
|
||||
export { useInitializeCheckout } from './checkout/useInitializeCheckout';
|
||||
|
||||
export const useAppDispatch = () => useDispatch<AppDispatch>();
|
||||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PaymentAmount, PaymentMethodsResponseInterface } from '@adyen/adyen-web/dist/types/types';
|
||||
import type { PaymentAmount, PaymentMethodsResponseInterface } from '@adyen/adyen-web/dist/types/types';
|
||||
|
||||
export type InitializationRequest = {
|
||||
merchantAccount: string;
|
||||
@@ -39,3 +39,5 @@ export interface CheckoutConfig extends EditableCheckoutConfigFields {
|
||||
onError?: (error: any, element?: any) => void;
|
||||
onPaymentCompleted?: (result: any, element: any) => void;
|
||||
}
|
||||
|
||||
export { PaymentAmount, PaymentMethodsResponseInterface };
|
||||
|
||||
Reference in New Issue
Block a user