@@ -62,21 +62,7 @@ export interface IRootState {
62
62
web3Wallet : ReturnType < typeof web3WalletSlice . reducer > ;
63
63
store : ReturnType < typeof indexSlice . reducer > ;
64
64
auth : ReturnType < typeof authSlice . reducer > ;
65
- coursesService : ReturnType < typeof coursesService . reducer > ;
66
- communityService : ReturnType < typeof communityService . reducer > ;
67
- walletService : ReturnType < typeof walletsService . reducer > ;
68
- userService : ReturnType < typeof userSlice . reducer > ;
69
65
userReputations : ReturnType < typeof userReputationSlice . reducer > ;
70
- userReputationService : ReturnType < typeof userReputationService . reducer > ;
71
- userProfileService : ReturnType < typeof userProfileService . reducer > ;
72
- notificationService : ReturnType < typeof notificationsService . reducer > ;
73
- certificateService : ReturnType < typeof certificateService . reducer > ;
74
- reputationProfileService : ReturnType < typeof reputationProfileService . reducer > ;
75
- profileCommunitiesService : ReturnType < typeof profileCommunitiesService . reducer > ;
76
- challengeService : ReturnType < typeof challengeService . reducer > ;
77
- scoreboardService : ReturnType < typeof scoreboardService . reducer > ;
78
- authService : ReturnType < typeof authService . reducer > ;
79
- bountiesService : ReturnType < typeof bountiesService . reducer > ;
80
66
scoreboard : ReturnType < typeof scoreboardSlice . reducer > ;
81
67
bounties : ReturnType < typeof bountiesSlice . reducer > ;
82
68
submissions : ReturnType < typeof submissionsSlice . reducer > ;
@@ -94,82 +80,103 @@ export interface IRootState {
94
80
sumsubVerification : ReturnType < typeof sumsubVerificationSlice . reducer > ;
95
81
payouts : ReturnType < typeof payoutsSlice . reducer > ;
96
82
teams : ReturnType < typeof teamsSlice . reducer > ;
97
- teamsService : ReturnType < typeof teamsService . reducer > ;
98
83
invites : ReturnType < typeof invitesSlice . reducer > ;
99
84
learningModuleService : ReturnType < typeof learningModulesService . reducer > ;
100
85
}
101
86
87
+ export type IRootService = {
88
+ coursesService : ReturnType < typeof coursesService . reducer > ;
89
+ communityService : ReturnType < typeof communityService . reducer > ;
90
+ walletService : ReturnType < typeof walletsService . reducer > ;
91
+ userService : ReturnType < typeof userSlice . reducer > ;
92
+ userReputationService : ReturnType < typeof userReputationService . reducer > ;
93
+ userProfileService : ReturnType < typeof userProfileService . reducer > ;
94
+ notificationService : ReturnType < typeof notificationsService . reducer > ;
95
+ certificateService : ReturnType < typeof certificateService . reducer > ;
96
+ reputationProfileService : ReturnType < typeof reputationProfileService . reducer > ;
97
+ profileCommunitiesService : ReturnType < typeof profileCommunitiesService . reducer > ;
98
+ challengeService : ReturnType < typeof challengeService . reducer > ;
99
+ scoreboardService : ReturnType < typeof scoreboardService . reducer > ;
100
+ authService : ReturnType < typeof authService . reducer > ;
101
+ bountiesService : ReturnType < typeof bountiesService . reducer > ;
102
+ teamsService : ReturnType < typeof teamsService . reducer > ;
103
+ } ;
104
+
105
+ export const reducers = {
106
+ [ ui . name ] : ui . reducer ,
107
+ [ referralSlice . name ] : referralSlice . reducer ,
108
+ [ userSlice . name ] : userSlice . reducer ,
109
+ [ notificationsSlice . name ] : notificationsSlice . reducer ,
110
+ [ bannerSlice . name ] : bannerSlice . reducer ,
111
+ [ walletsSlice . name ] : walletsSlice . reducer ,
112
+ [ indexSlice . name ] : indexSlice . reducer ,
113
+ [ authSlice . name ] : authSlice . reducer ,
114
+ [ authService . reducerPath ] : authService . reducer ,
115
+ [ courseSlice . name ] : courseSlice . reducer ,
116
+ [ navigationSlice . name ] : navigationSlice . reducer ,
117
+ [ submissionsSlice . name ] : submissionsSlice . reducer ,
118
+ [ eventsSlice . name ] : eventsSlice . reducer ,
119
+ [ bountiesSlice . name ] : bountiesSlice . reducer ,
120
+ [ communitySlice . name ] : communitySlice . reducer ,
121
+ [ learningModulesSlice . name ] : learningModulesSlice . reducer ,
122
+ [ userProfileSlice . name ] : userProfileSlice . reducer ,
123
+ [ userReputationSlice . name ] : userReputationSlice . reducer ,
124
+ [ feedbackSlice . name ] : feedbackSlice . reducer ,
125
+ [ challengeSlice . name ] : challengeSlice . reducer ,
126
+ [ web3WalletSlice . name ] : web3WalletSlice . reducer ,
127
+ [ communityService . reducerPath ] : communityService . reducer ,
128
+ [ bountiesService . reducerPath ] : bountiesService . reducer ,
129
+ [ coursesService . reducerPath ] : coursesService . reducer ,
130
+ [ certificateService . reducerPath ] : certificateService . reducer ,
131
+ [ walletsService . reducerPath ] : walletsService . reducer ,
132
+ [ reputationProfileService . reducerPath ] : reputationProfileService . reducer ,
133
+ [ profileCommunitiesService . reducerPath ] : profileCommunitiesService . reducer ,
134
+ [ userService . reducerPath ] : userService . reducer ,
135
+ [ userProfileService . reducerPath ] : userProfileService . reducer ,
136
+ [ userReputationService . reducerPath ] : userReputationService . reducer ,
137
+ [ referralsService . reducerPath ] : referralsService . reducer ,
138
+ [ notificationsService . reducerPath ] : notificationsService . reducer ,
139
+ [ scoreboardSlice . name ] : scoreboardSlice . reducer ,
140
+ [ certificateSlice . name ] : certificateSlice . reducer ,
141
+ [ userReferralsSlice . name ] : userReferralsSlice . reducer ,
142
+ [ sumsubVerificationSlice . name ] : sumsubVerificationSlice . reducer ,
143
+ [ payoutsSlice . name ] : payoutsSlice . reducer ,
144
+ [ teamsSlice . name ] : teamsSlice . reducer ,
145
+ [ teamsService . reducerPath ] : teamsService . reducer ,
146
+ [ challengeService . reducerPath ] : challengeService . reducer ,
147
+ [ scoreboardService . reducerPath ] : scoreboardService . reducer ,
148
+ [ invitesSlice . name ] : invitesSlice . reducer ,
149
+ [ communitiesProfile . name ] : communitiesProfile . reducer ,
150
+ [ reputationSlice . name ] : reputationSlice . reducer ,
151
+ } ;
152
+
153
+ export const middlewares = [
154
+ coursesService . middleware ,
155
+ communityService . middleware ,
156
+ walletsService . middleware ,
157
+ userService . middleware ,
158
+ referralsService . middleware ,
159
+ notificationsService . middleware ,
160
+ userProfileService . middleware ,
161
+ bountiesService . middleware ,
162
+ certificateService . middleware ,
163
+ reputationProfileService . middleware ,
164
+ profileCommunitiesService . middleware ,
165
+ userReputationService . middleware ,
166
+ authService . middleware ,
167
+ teamsService . middleware ,
168
+ challengeService . middleware ,
169
+ scoreboardService . middleware ,
170
+ ] ;
171
+
102
172
export const makeStore = ( ) =>
103
173
configureStore ( {
104
174
reducer : {
105
- [ ui . name ] : ui . reducer ,
106
- [ referralSlice . name ] : referralSlice . reducer ,
107
- [ userSlice . name ] : userSlice . reducer ,
108
- [ notificationsSlice . name ] : notificationsSlice . reducer ,
109
- [ bannerSlice . name ] : bannerSlice . reducer ,
110
- [ walletsSlice . name ] : walletsSlice . reducer ,
111
- [ indexSlice . name ] : indexSlice . reducer ,
112
- [ authSlice . name ] : authSlice . reducer ,
113
- [ authService . reducerPath ] : authService . reducer ,
114
- [ courseSlice . name ] : courseSlice . reducer ,
115
- [ navigationSlice . name ] : navigationSlice . reducer ,
116
- [ submissionsSlice . name ] : submissionsSlice . reducer ,
117
- [ eventsSlice . name ] : eventsSlice . reducer ,
118
- [ bountiesSlice . name ] : bountiesSlice . reducer ,
119
- [ communitySlice . name ] : communitySlice . reducer ,
120
- [ learningModulesSlice . name ] : learningModulesSlice . reducer ,
121
- [ userProfileSlice . name ] : userProfileSlice . reducer ,
122
- [ userReputationSlice . name ] : userReputationSlice . reducer ,
123
- [ feedbackSlice . name ] : feedbackSlice . reducer ,
124
- [ challengeSlice . name ] : challengeSlice . reducer ,
125
- [ web3WalletSlice . name ] : web3WalletSlice . reducer ,
126
- [ communityService . reducerPath ] : communityService . reducer ,
127
- [ bountiesService . reducerPath ] : bountiesService . reducer ,
128
- [ coursesService . reducerPath ] : coursesService . reducer ,
129
- [ certificateService . reducerPath ] : certificateService . reducer ,
130
- [ walletsService . reducerPath ] : walletsService . reducer ,
131
- [ reputationProfileService . reducerPath ] : reputationProfileService . reducer ,
132
- [ profileCommunitiesService . reducerPath ] : profileCommunitiesService . reducer ,
133
- [ userService . reducerPath ] : userService . reducer ,
134
- [ userProfileService . reducerPath ] : userProfileService . reducer ,
135
- [ userReputationService . reducerPath ] : userReputationService . reducer ,
136
- [ referralsService . reducerPath ] : referralsService . reducer ,
137
- [ notificationsService . reducerPath ] : notificationsService . reducer ,
138
- [ scoreboardSlice . name ] : scoreboardSlice . reducer ,
139
- [ certificateSlice . name ] : certificateSlice . reducer ,
140
- [ userReferralsSlice . name ] : userReferralsSlice . reducer ,
141
- [ sumsubVerificationSlice . name ] : sumsubVerificationSlice . reducer ,
142
- [ payoutsSlice . name ] : payoutsSlice . reducer ,
143
- [ teamsSlice . name ] : teamsSlice . reducer ,
144
- [ teamsService . reducerPath ] : teamsService . reducer ,
145
- [ challengeService . reducerPath ] : challengeService . reducer ,
146
- [ scoreboardService . reducerPath ] : scoreboardService . reducer ,
147
- [ invitesSlice . name ] : invitesSlice . reducer ,
148
- [ communitiesProfile . name ] : communitiesProfile . reducer ,
149
- [ reputationSlice . name ] : reputationSlice . reducer ,
150
- [ learningModulesService . reducerPath ] : learningModulesService . reducer ,
175
+ ...reducers ,
151
176
} ,
152
177
153
178
middleware : ( getDefaultMiddleware ) => {
154
- return getDefaultMiddleware ( ) . concat (
155
- coursesService . middleware ,
156
- communityService . middleware ,
157
- walletsService . middleware ,
158
- userService . middleware ,
159
- referralsService . middleware ,
160
- notificationsService . middleware ,
161
- userProfileService . middleware ,
162
- bountiesService . middleware ,
163
- certificateService . middleware ,
164
- reputationProfileService . middleware ,
165
- profileCommunitiesService . middleware ,
166
- userReputationService . middleware ,
167
- authService . middleware ,
168
- teamsService . middleware ,
169
- challengeService . middleware ,
170
- scoreboardService . middleware ,
171
- learningModulesService . middleware
172
- ) ;
179
+ return getDefaultMiddleware ( ) . concat ( ...middlewares ) ;
173
180
} ,
174
181
} ) ;
175
182
0 commit comments