mirror of
https://github.com/jlengrand/adyen-web-demo.git
synced 2026-03-10 08:01:24 +00:00
updated naming of descriptors for convention
This commit is contained in:
@@ -3,8 +3,8 @@ export {
|
||||
userActions,
|
||||
onDeckReducer,
|
||||
onDeckActions,
|
||||
descriptorReducer,
|
||||
descriptorActions,
|
||||
descriptorsReducer,
|
||||
descriptorsActions,
|
||||
configurationReducer,
|
||||
configurationActions
|
||||
} from './reducers';
|
||||
|
||||
@@ -8,8 +8,8 @@ const initialState: DescriptorList = {
|
||||
sessions: []
|
||||
};
|
||||
|
||||
export const descriptorSlice = createSlice({
|
||||
name: 'descriptor',
|
||||
export const descriptorsSlice = createSlice({
|
||||
name: 'descriptors',
|
||||
initialState,
|
||||
reducers: {
|
||||
updateDescriptors: (state, action: PayloadAction<DescriptorList>) => {
|
||||
@@ -24,4 +24,4 @@ export const descriptorSlice = createSlice({
|
||||
}
|
||||
});
|
||||
|
||||
export const { actions, reducer } = descriptorSlice;
|
||||
export const { actions, reducer } = descriptorsSlice;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export { reducer as userReducer, actions as userActions } from './user';
|
||||
export { reducer as onDeckReducer, actions as onDeckActions } from './onDeck';
|
||||
export { reducer as descriptorReducer, actions as descriptorActions } from './descriptors';
|
||||
export { reducer as descriptorsReducer, actions as descriptorsActions } from './descriptors';
|
||||
export { reducer as configurationReducer, actions as configurationActions } from './configuration';
|
||||
|
||||
@@ -2,14 +2,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
||||
|
||||
import type { OnDeckState } from '../types';
|
||||
|
||||
type InitialOnDeckStateType = {
|
||||
profile: {};
|
||||
global: {};
|
||||
local: {};
|
||||
sessions: {};
|
||||
};
|
||||
|
||||
const initialState: InitialOnDeckStateType = {
|
||||
const initialState: OnDeckState = {
|
||||
profile: {},
|
||||
global: {},
|
||||
local: {},
|
||||
|
||||
@@ -44,10 +44,10 @@ export type SessionsOnDeckState = {
|
||||
};
|
||||
|
||||
export type OnDeckState = {
|
||||
profile?: ProfileOnDeckState;
|
||||
global?: GlobalOnDeckState;
|
||||
local?: LocalOnDeckState;
|
||||
sessions?: SessionsOnDeckState;
|
||||
profile: ProfileOnDeckState | {};
|
||||
global: GlobalOnDeckState | {};
|
||||
local: LocalOnDeckState | {};
|
||||
sessions: SessionsOnDeckState | {};
|
||||
[key: string]: ProfileOnDeckState | GlobalOnDeckState | LocalOnDeckState | SessionsOnDeckState | {} | undefined;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { configureStore } from '@reduxjs/toolkit';
|
||||
import { userReducer, onDeckReducer, descriptorReducer, configurationReducer } from './app';
|
||||
import { userReducer, onDeckReducer, descriptorsReducer, configurationReducer } from './app';
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
user: userReducer,
|
||||
onDeck: onDeckReducer,
|
||||
descriptor: descriptorReducer,
|
||||
descriptors: descriptorsReducer,
|
||||
configuration: configurationReducer
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user