diff --git a/package.json b/package.json index ec6fc45cb..336c99be6 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -37,6 +37,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", diff --git a/src/redux/features/snackbarSlice.ts b/src/redux/features/snackbarSlice.ts index 337f1dfb9..cd02ddd62 100644 --- a/src/redux/features/snackbarSlice.ts +++ b/src/redux/features/snackbarSlice.ts @@ -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 + options: Draft } type SnackbarMessage = string | ExtendedSnackbarMessage diff --git a/src/redux/store.ts b/src/redux/store.ts index 4a2a053a8..3bb90c6d7 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -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' @@ -24,6 +23,3 @@ setupListeners(store.dispatch) export type RootState = ReturnType export type AppDispatch = typeof store.dispatch -export interface Store extends ToolkitStore { - dispatch: AppDispatch -}