Use import { ThemeProvider } from '@mui/styles' instead of import { ThemeProvider } from '@material-ui/styles'; maybe that will solve the issue.