UI: fixed Trendz settings after review

This commit is contained in:
yuliaklochai 2025-07-24 12:46:56 +03:00
parent 680cda2774
commit 310a412e51
3 changed files with 3 additions and 3 deletions

View File

@ -102,7 +102,7 @@ export class ActionPreferencesDeleteUserSettings implements Action {
export class ActionAuthUpdateTrendzSettings implements Action { export class ActionAuthUpdateTrendzSettings implements Action {
readonly type = AuthActionTypes.UPDATE_TRENDZ_SETTINGS; readonly type = AuthActionTypes.UPDATE_TRENDZ_SETTINGS;
constructor(readonly payload: { trendzSettings: TrendzSettings }) {} constructor(readonly payload: TrendzSettings) {}
} }
export type AuthActions = ActionAuthAuthenticated | ActionAuthUnauthenticated | export type AuthActions = ActionAuthAuthenticated | ActionAuthUnauthenticated |

View File

@ -100,7 +100,7 @@ export const authReducer = (
return { ...state, ...{ userSettings }}; return { ...state, ...{ userSettings }};
case AuthActionTypes.UPDATE_TRENDZ_SETTINGS: case AuthActionTypes.UPDATE_TRENDZ_SETTINGS:
return { ...state, ...action.payload }; return { ...state, trendzSettings: action.payload };
default: default:
return state; return state;

View File

@ -97,7 +97,7 @@ export class TrendzSettingsComponent extends PageComponent implements OnInit, Ha
this.trendzSettingsService.saveTrendzSettings(trendzSettings) this.trendzSettingsService.saveTrendzSettings(trendzSettings)
.subscribe(() => { .subscribe(() => {
this.setTrendzSettings(trendzSettings); this.setTrendzSettings(trendzSettings);
this.store.dispatch(new ActionAuthUpdateTrendzSettings({ trendzSettings: trendzSettings})) this.store.dispatch(new ActionAuthUpdateTrendzSettings(trendzSettings))
}) })
} }
} }