fix: Depcreated createReducer calls
This commit is contained in:
@@ -19,23 +19,23 @@ const initialState: State = {
|
|||||||
hasReceivedErrorReportingAlert: false,
|
hasReceivedErrorReportingAlert: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const settings = createReducer(initialState, {
|
const settings = createReducer(initialState, builder => {
|
||||||
[setJellyfinCredentials.type]: (state, action) => ({
|
builder.addCase(setJellyfinCredentials, (state, action) => ({
|
||||||
...state,
|
...state,
|
||||||
jellyfin: action.payload,
|
jellyfin: action.payload,
|
||||||
}),
|
}));
|
||||||
[setBitrate.type]: (state, action) => ({
|
builder.addCase(setBitrate, (state, action) => ({
|
||||||
...state,
|
...state,
|
||||||
bitrate: action.payload,
|
bitrate: action.payload,
|
||||||
}),
|
}));
|
||||||
[setOnboardingStatus.type]: (state, action) => ({
|
builder.addCase(setOnboardingStatus, (state, action) => ({
|
||||||
...state,
|
...state,
|
||||||
isOnboardingComplete: action.payload,
|
isOnboardingComplete: action.payload,
|
||||||
}),
|
}));
|
||||||
[setReceivedErrorReportingAlert.type]: (state) => ({
|
builder.addCase(setReceivedErrorReportingAlert, (state) => ({
|
||||||
...state,
|
...state,
|
||||||
hasReceivedErrorReportingAlert: true,
|
hasReceivedErrorReportingAlert: true,
|
||||||
})
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
export default settings;
|
export default settings;
|
||||||
Reference in New Issue
Block a user