mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
- Added Site settings > Authentication section - Create/edit/delete your custom oauth2 configurations - Login or signup with oauth2
48 lines
870 B
TypeScript
48 lines
870 B
TypeScript
import {
|
|
UserUpdateActionTypes,
|
|
USER_UPDATE_START,
|
|
USER_UPDATE_SUCCESS,
|
|
USER_UPDATE_FAILURE,
|
|
} from '../../actions/User/updateUser';
|
|
|
|
export interface SiteSettingsUsersState {
|
|
areUpdating: boolean;
|
|
error: string;
|
|
}
|
|
|
|
const initialState: SiteSettingsUsersState = {
|
|
areUpdating: false,
|
|
error: '',
|
|
};
|
|
|
|
const siteSettingsUsersReducer = (
|
|
state = initialState,
|
|
action: UserUpdateActionTypes,
|
|
) => {
|
|
switch (action.type) {
|
|
case USER_UPDATE_START:
|
|
return {
|
|
...state,
|
|
areUpdating: true,
|
|
};
|
|
|
|
case USER_UPDATE_SUCCESS:
|
|
return {
|
|
...state,
|
|
areUpdating: false,
|
|
error: '',
|
|
};
|
|
|
|
case USER_UPDATE_FAILURE:
|
|
return {
|
|
...state,
|
|
areUpdating: false,
|
|
error: action.error,
|
|
};
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
|
|
export default siteSettingsUsersReducer; |