Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated redux and redux toolkit #2248

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.16",
"@mui/x-date-pickers": "^7.11.0",
"@reduxjs/toolkit": "^1.9.7",
"@reduxjs/toolkit": "^2.2.7",
"@tinymce/tinymce-react": "^5.1.1",
"allotment": "^1.19.3",
"axios": "^1.6.0",
Expand All @@ -27,7 +27,7 @@
"react-dom": "^18.2.0",
"react-i18next": "^15.0.0",
"react-player": "^2.16.0",
"react-redux": "^8.1.3",
"react-redux": "^9.1.2",
"react-router-dom": "^6.18.0",
"react-swipeable-views": "^0.14.0",
"react-transition-group": "^4.4.5",
Expand All @@ -36,6 +36,9 @@
"vite-plugin-svgr": "^4.1.0",
"web-vitals": "^4.2.2"
},
"overrides": {
"redux": "^5.0.0"
},
"devDependencies": {
"@babel/core": "^7.23.2",
"@eslint/compat": "^1.1.1",
Expand Down
5 changes: 2 additions & 3 deletions src/redux/features/snackbarSlice.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { createSlice, PayloadAction } from '@reduxjs/toolkit'
import { createSlice, PayloadAction, Draft } from '@reduxjs/toolkit'
import { AlertColor } from '@mui/material/Alert'
import { sliceNames } from '~/redux/redux.constants'
import { RootState } from '~/redux/store'
import { TOptions } from 'i18next/typescript/options'
import { WritableDraft } from 'immer/dist/internal'

interface ExtendedSnackbarMessage {
text: string
options: WritableDraft<TOptions>
options: Draft<TOptions>
}

type SnackbarMessage = string | ExtendedSnackbarMessage
Expand Down
4 changes: 0 additions & 4 deletions src/redux/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { configureStore } from '@reduxjs/toolkit'
import { setupListeners } from '@reduxjs/toolkit/query/react'
import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore'

import { appApi } from '~/redux/apiSlice'
import appMainReducer from '~/redux/reducer'
Expand All @@ -24,6 +23,3 @@ setupListeners(store.dispatch)

export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch
export interface Store extends ToolkitStore {
dispatch: AppDispatch
}
Loading