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

Remove deprecated @mui/styles package #3862

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"@mui/icons-material": "^5.11.16",
"@mui/lab": "^5.0.0-alpha.134",
"@mui/material": "^5.13.5",
"@mui/styles": "^5.13.2",
"@mui/utils": "^5.13.1",
"@mui/x-tree-view": "^6.17.0",
"@react-aria/live-announcer": "^3.1.2",
"@redux-devtools/extension": "^3.3.0",
"classnames": "^2.2.6",
"clsx": "^1.0.4",
"deepmerge": "^4.2.2",
Expand Down
16 changes: 4 additions & 12 deletions src/components/AppProviders.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { I18nextProvider } from 'react-i18next';
import {
ThemeProvider, StyledEngineProvider, createTheme,
} from '@mui/material/styles';
import StylesProvider from '@mui/styles/StylesProvider';
import createGenerateClassName from '@mui/styles/createGenerateClassName';
import { DndContext, DndProvider } from 'react-dnd';
import { MultiBackend } from 'react-dnd-multi-backend';
import { HTML5toTouch } from 'rdndmb-html5-to-touch';
Expand Down Expand Up @@ -96,13 +94,11 @@ export class AppProviders extends Component {
/** */
render() {
const {
children, createGenerateClassNameOptions,
children,
theme, translations,
dndManager,
} = this.props;

const generateClassName = createGenerateClassName(createGenerateClassNameOptions);

/**
* Create rtl emotion cache
*/
Expand All @@ -128,11 +124,9 @@ export class AppProviders extends Component {
<StyledEngineProvider injectFirst>
<CacheProvider value={theme.direction === 'rtl' ? cacheRtl : cacheDefault}>
<ThemeProvider theme={createTheme((theme))}>
<StylesProvider generateClassName={generateClassName}>
<MaybeDndProvider dndManager={dndManager}>
{children}
</MaybeDndProvider>
</StylesProvider>
<MaybeDndProvider dndManager={dndManager}>
{children}
</MaybeDndProvider>
</ThemeProvider>
</CacheProvider>
</StyledEngineProvider>
Expand All @@ -144,7 +138,6 @@ export class AppProviders extends Component {

AppProviders.propTypes = {
children: PropTypes.node,
createGenerateClassNameOptions: PropTypes.object, // eslint-disable-line react/forbid-prop-types
dndManager: PropTypes.object, // eslint-disable-line react/forbid-prop-types
language: PropTypes.string.isRequired,
theme: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
Expand All @@ -153,6 +146,5 @@ AppProviders.propTypes = {

AppProviders.defaultProps = {
children: null,
createGenerateClassNameOptions: {},
dndManager: undefined,
};
1 change: 0 additions & 1 deletion src/containers/AppProviders.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { AppProviders } from '../components/AppProviders';
*/
const mapStateToProps = state => (
{
createGenerateClassNameOptions: getConfig(state).createGenerateClassNameOptions,
language: getConfig(state).language,
theme: getTheme(state),
translations: getConfig(state).translations,
Expand Down
2 changes: 1 addition & 1 deletion src/state/createStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import thunkMiddleware from 'redux-thunk';
import createSagaMiddleware from 'redux-saga';
import { combineReducers, createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import { composeWithDevTools } from '@redux-devtools/extension';
import createRootReducer from './reducers/rootReducer';
import getRootSaga from './sagas';
import settings from '../config/settings';
Expand Down