Skip to content

Commit

Permalink
fix: Update Redux Toolkit to v2 and react-redux to v9
Browse files Browse the repository at this point in the history
Combination of #665 and #667 along with a necessary code fix.
  • Loading branch information
meyfa committed Jul 21, 2024
1 parent 31a3f88 commit 171671a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 83 deletions.
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@fortawesome/fontawesome-svg-core": "6.6.0",
"@fortawesome/free-solid-svg-icons": "6.6.0",
"@fortawesome/react-fontawesome": "0.2.2",
"@reduxjs/toolkit": "1.9.7",
"@reduxjs/toolkit": "2.2.6",
"body-scroll-lock": "4.0.0-beta.0",
"clsx": "2.1.1",
"i18next": "23.12.2",
Expand All @@ -23,7 +23,7 @@
"react": "18.3.1",
"react-dom": "18.3.1",
"react-i18next": "15.0.0",
"react-redux": "8.1.3",
"react-redux": "9.1.2",
"react-router-dom": "6.25.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/create-entity-slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function defaultComparer (a: Entity | Draft<Entity>, b: Entity | Draft<En
return a._id.localeCompare(b._id)
}

export interface EntitySliceReducers<T extends Entity> extends SliceCaseReducers<T[]> {
export type EntitySliceReducers<T extends Entity> = SliceCaseReducers<T[]> & {
setEntities: CaseReducer<T[], PayloadAction<T[]>>
createEntity: CaseReducer<T[], PayloadAction<T>>
updateEntity: CaseReducer<T[], PayloadAction<T>>
Expand Down
113 changes: 33 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 171671a

Please sign in to comment.