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
49 lines
901 B
TypeScript
49 lines
901 B
TypeScript
import {
|
|
TenantUpdateActionTypes,
|
|
TENANT_UPDATE_START,
|
|
TENANT_UPDATE_SUCCESS,
|
|
TENANT_UPDATE_FAILURE,
|
|
} from '../../actions/Tenant/updateTenant';
|
|
|
|
export interface SiteSettingsGeneralState {
|
|
areUpdating: boolean;
|
|
error: string;
|
|
}
|
|
|
|
const initialState: SiteSettingsGeneralState = {
|
|
areUpdating: false,
|
|
error: '',
|
|
};
|
|
|
|
const siteSettingsGeneralReducer = (
|
|
state = initialState,
|
|
action:
|
|
TenantUpdateActionTypes
|
|
) => {
|
|
switch (action.type) {
|
|
case TENANT_UPDATE_START:
|
|
return {
|
|
...state,
|
|
areUpdating: true,
|
|
};
|
|
|
|
case TENANT_UPDATE_SUCCESS:
|
|
return {
|
|
...state,
|
|
areUpdating: false,
|
|
error: '',
|
|
};
|
|
|
|
case TENANT_UPDATE_FAILURE:
|
|
return {
|
|
...state,
|
|
areUpdating: false,
|
|
error: action.error,
|
|
};
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
|
|
export default siteSettingsGeneralReducer; |