UI: fixed Trendz settings after review
This commit is contained in:
parent
680cda2774
commit
310a412e51
@ -102,7 +102,7 @@ export class ActionPreferencesDeleteUserSettings implements Action {
|
||||
export class ActionAuthUpdateTrendzSettings implements Action {
|
||||
readonly type = AuthActionTypes.UPDATE_TRENDZ_SETTINGS;
|
||||
|
||||
constructor(readonly payload: { trendzSettings: TrendzSettings }) {}
|
||||
constructor(readonly payload: TrendzSettings) {}
|
||||
}
|
||||
|
||||
export type AuthActions = ActionAuthAuthenticated | ActionAuthUnauthenticated |
|
||||
|
||||
@ -100,7 +100,7 @@ export const authReducer = (
|
||||
return { ...state, ...{ userSettings }};
|
||||
|
||||
case AuthActionTypes.UPDATE_TRENDZ_SETTINGS:
|
||||
return { ...state, ...action.payload };
|
||||
return { ...state, trendzSettings: action.payload };
|
||||
|
||||
default:
|
||||
return state;
|
||||
|
||||
@ -97,7 +97,7 @@ export class TrendzSettingsComponent extends PageComponent implements OnInit, Ha
|
||||
this.trendzSettingsService.saveTrendzSettings(trendzSettings)
|
||||
.subscribe(() => {
|
||||
this.setTrendzSettings(trendzSettings);
|
||||
this.store.dispatch(new ActionAuthUpdateTrendzSettings({ trendzSettings: trendzSettings}))
|
||||
this.store.dispatch(new ActionAuthUpdateTrendzSettings(trendzSettings))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user